UIGestureRecognizer 阻止表格单元格视图中的按钮
我在 UITableView 上使用自定义 UIGestureRecognizer。
一旦我将 GestureRecognizer 添加到视图中,表格单元格内的按钮就会停止工作(尽管将可见状态更改为按下,但不会调用任何操作)。
我正在使用 [self setCancelsTouchesInView:NO];
并且没有识别器链接或其他任何东西。
有人有什么想法吗?
最好的问候,
亚历克斯
I am using a custom UIGestureRecognizer on a UITableView.
As soon as I add the GestureRecognizer to the view, the buttons inside my table cells stop working (although changing the visible state to pressed, no action is being called).
And I am using [self setCancelsTouchesInView:NO];
and no recognizer chaining or what-so-ever.
Any ideas anyone?
Best regards,
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能遇到了delaysTouchesEnded 问题。将其设置为“否”可能会解决您的问题。看一下文档。
http://developer.apple.com /library/ios/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html
It is possible that you are running into an issue with delaysTouchesEnded. Setting it to NO may fix your problem. Have a look at the docs.
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html