我正在设计一个应用程序在swift,其中包含左侧的菜单。我使用了导航控制器来识别平移,这取决于我切换左侧菜单的方式。
下面是使用导航控制器附加平移手势的代码
let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: "handlePanGesture:")
centerNavigationController.view.addGestureRecognizer(panGestureRecognizer)*在其他控制器中,它工作得很好,但在有滚动视图的控制器中,我希望滚动视图滚动到内容偏移量为0并进一步滚动到左侧后,它应该会打开左侧菜单。但是它阻止了调用平移手势。
这是相互矛盾的。
我已经尝试了许多使用方法的解决方案
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {}但它并没有起作用。
如果需要任何额外的信息来定义问题,请让我知道。
提前谢谢。
发布于 2016-03-11 18:05:59
https://github.com/John-Lluch/SWRevealViewController
使用SwrevealviewController,您将获得所有这些功能
https://stackoverflow.com/questions/35936824
复制相似问题