我有一个 UIView 覆盖了 UITableView 的所有内容。
UIView 使用手势识别器来控制表格显示的内容。
我仍然需要垂直 UITableView 滚动和行点击。
我如何将这些从手势识别器传递到桌子上?
如果您需要知道单元格的索引路径:
- (void)handleSwipeFrom:(UIGestureRecognizer *)recognizer {
CGPoint swipeLocation = [recognizer locationInView:self.tableView];
NSIndexPath *swipedIndexPath = [self.tableView indexPathForRowAtPoint:swipeLocation];
UITableViewCell *swipedCell = [self.tableView cellForRowAtIndexPath:swipedIndexPath];
}
这个问题之前已经回答过UIGestureRecognizer 和 UITableViewCell 问题 https://stackoverflow.com/a/4604667/213987.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)