防止 uitableview 在水平触摸后取消触摸事件
我有一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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: