我需要访问 TableView 中选定行的标题。 但是当我需要在 TableViewDelegate 外部访问它时,即出现问题:cellForRowAtIndexPath、didSelectRowAtIndexPath 等。 有没有人可以帮助我。 提前致谢。
最佳答案
这个怎么样?
- (IBAction)ButtonAction:(id)sender {
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:tableView];
NSIndexPath *selectedindex = [tableView indexPathForRowAtPoint:buttonPosition];
UITableViewCell *Cell = [tableView cellForRowAtIndexPath:selectedIndexPath];
}
关于ios - 我需要访问 TableViewDelegate 之外的 TableView 的选定行的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35871616/