访问超级视图ScrollView?
我向 UIScrollView 添加了一些视图(每个视图都有自己的视图控制器和笔尖)。如何从我添加的 UIView 中访问 ScrollView?
self.view.superview 没有给我 UIScrollView 属性。我需要从 UIView 中禁用scrollEnabled。
谢谢你!
i added some views (every view has its own viewcontroller and nib) to an UIScrollView. How can I access the ScrollView from within the UIViews I've added?
self.view.superview doesn't get me the UIScrollView properties. I need to disable scrollEnabled from within an UIView.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许尝试 (UIScrollView*)(self.view.superview).property 访问您想要的属性:-)
它应该有效。
但也许有一个代表会更好:-p
祝你好运!
Maybe try (UIScrollView*)(self.view.superview).property to access the property you want :-)
It should work.
But maybe with an Delegate it would be better :-p
Good Luck !