- (void)button:(id)sender {
UITableViewCell * cell = (UITableViewCell *)[[sender superview] superview];
NSIndexPath * indexPath = [_mTableView indexPathForCell:cell];
NSLog(@"index row%ld", (long)[indexPath row]);
//可以根据indexpath 获取当前的cell。
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
}
本文详细介绍了如何通过按钮点击事件获取表格中特定单元格的行索引,并通过索引来获取并操作该单元格的内容。
2260

被折叠的 条评论
为什么被折叠?



