0
我尝试使用UIPageViewController
作为标准分页与滚动转换样式,而从边缘开始的手势会触发不同的操作。目前我正在试图用来做到这一点。但是,无论我做什么,UIPageViewController
的手势识别器都会覆盖从未激活的。有任何想法吗?让UIScreenEdgePanGestureRecognizer覆盖UIPageViewController手势
我尝试使用UIPageViewController
作为标准分页与滚动转换样式,而从边缘开始的手势会触发不同的操作。目前我正在试图用来做到这一点。但是,无论我做什么,UIPageViewController
的手势识别器都会覆盖从未激活的。有任何想法吗?让UIScreenEdgePanGestureRecognizer覆盖UIPageViewController手势
为了让多个手势识别器同时工作,你必须表明,从UIGestureRecognizerProtocol
覆盖shouldRecognizeSimultaneouslyWithGestureRecognizer
:
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
这个例子的所有手势识别返回true
,你可以限制/与传递的配置行为参数。