嵌套的 UIScrollView

发布于 2024-12-18 03:58:31 字数 309 浏览 5 评论 0原文

我在 iPhone 中遇到 UIScrollViews 问题。我有另一个子视图的子视图。父滚动视图显示一个 ViewController,其中包含另一个滚动视图。

如果滚动视图子元素有 2 个元素,我想要做的是当滚动视图子元素应该弹起时传递滚动视图事件,因为没有更多内容要显示。这可能吗?

示例:

scrollviewfather:2个元素 scrollviewchild = 4 elements

用户在下一个滚动时滚动 4 次 child a (因为没有更多内容),父亲将被滚动!

有什么想法吗?任何事情都会受到赞赏!

I have an issue with UIScrollViews in IPhone. I have a subview child of another one. The father scrollview displays a ViewController that contains itself another scrollview.

If the scrollview child has 2 elements what I want to do is pass the scrollview events when the scrollview child is supose to bounce because there is no more content to be shown. Is that possible?

example:

scrollviewfather: 2 elements
scrollviewchild = 4 elements

Users scroll 4 times child a on the next scroll (cause there's no more content) the father will be scrolled!

any ideas? anything will be appreciated!

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

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

发布评论

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

评论(1

护你周全 2024-12-25 03:58:31

您可以设置滚动视图滚动高度宽度..像这样...

childScrollview.contentSize = CGSizeMake(contentWidth*4,height);// control width and height 

滚动...此处 contentWidth * 4 因为您有四个内容...

希望它可以帮助您...祝你好运:)

you can set the scrollview scroll height width ..like this...

childScrollview.contentSize = CGSizeMake(contentWidth*4,height);// control width and height 

scrolling... here contentWidth * 4 because you have four contents...

hope its help you... GUD LUCK :)

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