gpt4 book ai didi

uitableview - 手势识别器和 TableView

转载 作者:行者123 更新时间:2023-12-03 07:13:48 25 4
gpt4 key购买 nike

我有一个 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 and UITableViewCell issue 中得到解答。 .

关于uitableview - 手势识别器和 TableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4454920/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com