ios - IndexPathForRowAtPoint 不工作 iOS 13.4.1
问题描述
我有一个填充了 UITableViewHeaders(部分)的 TableView ...标题上有一个 LongGesture,我使用下面的代码拖动标题以进行重新排序。现在这适用于我的所有设备,直到 13.3.1,但最近才收到用户抱怨 tableview 没有响应。以下是用于获取当前视图索引的简短代码,该视图在 iOS 13.4.1 之前有效,任何建议/解决方法将不胜感激
- (void)longPressGestureRecognized:(UILongPressGestureRecognizer*)longPress {
UIGestureRecognizerState state = longPress.state;
CGPoint location = [longPress locationInView:self.mainTable];
NSIndexPath *indexPath = [self.mainTable indexPathForRowAtPoint:location];
//do my cool stuff with index path....
}
解决方案
推荐阅读
- python - 我应该如何将这些列表放在一起?
- list - Agda 标准库列表最大值
- javascript - 如何让用户保存文件并仅在浏览器 Javascript 中继续编辑该文件?
- c# - C# MS Word 互操作性 - 如何拉伸填充表格中的最后一列
- python - 正确组合数据帧
- r - R - 底图功能 - 自定义轴
- python - Python Zeep 为肥皂请求引发未知错误
- sql-server - 无法从 SQL Server 发送带有查询结果的电子邮件
- sql - SQL - 根据日期时间创建一个不同的列表
- python-3.x - 如何在python中创建一个迭代器类,它将以相反的顺序遍历输入?