防止 uitableview 在水平触摸后取消触摸事件

发布于 2024-12-26 05:49:26 字数 208 浏览 2 评论 0原文

我有一个 UITableView。如果您触摸一行,然后向左或向右滑动手指,它似乎会阻止任何进一步的 UITouch 事件被识别。

我有 2 个表格视图。我希望能够从右侧表格视图向左侧滑动一行,并且当我拖动时,我仍然希望能够在左侧表格视图视图上滚动,以决定将行从右侧表格视图放置到何处。但是,一旦我将行拖到左侧,就不再识别触摸事件。

有什么想法吗?

谢谢!

I have a UITableView. If you touch a row, and then slide your finger left or right, it seems to block any further UITouch events from being recognized.

I have 2 tableviews. I want to be able to slide a row from the right tableview to the left, and as I'm dragging I want to still be able to scroll around on the left tableview view to decide where to drop the row from the right tableview. But as soon as I drag the row to the left, no more touch events are recognized.

Any ideas?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

花伊自在美 2025-01-02 05:49:26

UITableView 有一些内置的手势识别功能,可能会与您发生冲突。

您是否在数据源中实现了 tableView:commitEditingStyle:forRowAtIndexPath: ?如果是这样,它会消耗您的滑动手势来执行内置的行删除操作。请参阅Apple的文档: tableView:commitEditingStyle:forRowAtIndexPath:

UITableView has some built in gesture recognition stuff that might be fighting with you.

Did you implement tableView:commitEditingStyle:forRowAtIndexPath: in your data source? If so, its consuming your swipe gesture for the built in row-deletion stuff. See Apple's Documentation: tableView:commitEditingStyle:forRowAtIndexPath:

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