UITableView 滚动在 UIScrollView 内部不起作用

发布于 2024-09-27 05:25:25 字数 327 浏览 0 评论 0原文

我在 UIScrollView 中添加了 UITableView。运行良好。 UITableView 宽度是 1200。我将滚动移动到超过 320 ,我无法在 UITableView 中滚动和单击。在 0 到 320px 之间,它工作正常。超过320,UIScrollView拖着UITableview也不能滚动也不能点击。

编辑:

我添加

scrollview.contentSize = CGSizeMake(1200, 1);

Scrollview 现在不拖动。但是,无法在 UITableView 中向下滚动超过 320px 宽度。

I add UITableView inside UIScrollView. It's working fine. UITableView width is 1200. I move scroll to over 320 , I can't scroll and click in UITableView. Between 0 and 320px, it's working fine. Over 320, UIScrollView is dragging the UITableview and can't scroll and can't clik ,too.

Edit:

I add

scrollview.contentSize = CGSizeMake(1200, 1);

Scrollview is not dragging now. However, can't scroll down in UITableView over 320px width.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小巷里的女流氓 2024-10-04 05:25:25

将滚动视图内容大小高度增加到表格的高度。如果高度为1,那么如何将表格作为子视图添加到高度为1的滚动视图中。

Increase the scroll view content size height to the height of the table.If the height is 1 then how are u adding a table as a subview to a scroll view of height 1.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文