UIGestureRecognizer 阻止表格单元格视图中的按钮

发布于 2024-09-24 02:19:56 字数 254 浏览 1 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自此以后,行同陌路 2024-10-01 02:19:56

您可能遇到了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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文