【发布时间】:2015-06-26 22:08:05
【问题描述】:
我的设置
我正在尝试复制 Google Now 的卡片界面。
我有一个UIView,它是(内部)UIScrollView 的子视图。两者都由同一个UIViewController 控制。 UIView 有一个由 UIViewController 附加的 UIPanGestureRecognizer。
UIScrollView 用于上下滚动。 UIPanGestureRecognizer 用于扫掉UIView。
问题
触摸UIView(卡片)时无法滚动
问题
如何实现UIGestureRecognizerDelegate 以在卡上启用gestureRecognizer(_:shouldRecognizeSimultaneouslyWithGestureRecognizer:) 以便让UIScrollView 滚动?
我已经花了几个小时试图解决这个问题,我将非常感谢您的帮助。
【问题讨论】:
标签: ios swift uiview uiscrollview uipangesturerecognizer