UIScrollView。如何解决启用触摸的子视图的缓慢响应问题?
我的滚动视图有一个可拖动/缩放的容器视图。 containerView 是我自己设计的 UIView 子类的父类,它可以响应点击和拖动。我的问题:containerView 的滚动/缩放现在完全是垃圾,滚动/缩放有时只是完全忽略滑动尝试。感觉好像触摸现在混淆了谁在运行该节目:scrollView 或containerView 子类。
我应该放弃处理点击的子类并让scrollView管理所有子视图触摸吗?如果是的话那会是什么样子?我是否只是子类化 UIScrollView 并实现 Touchs 四重奏方法?
提前致谢。
-道格
My scrollView has a drag/zoom -able containerView. The containerView is parent to a UIView subclass of my own design that can respond to tap and drag. My problem: scroll/zoom of the containerView is now total crap, with scroll/zoom sometimes just ignoring swipe attempts entirely. It feels as if touches are now confused as to who is running the show: the scrollView or the containerView sub-classes.
Should I just bail on the sub-classes handling taps and have the scrollView manage all sub-view touches? If so what would that look like? Do I just sub-class UIScrollView and implement the touches quartet of methods?
Thanks in advance.
-Doug
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试设置:
Try setting: