1.点击cell获取当前的cell
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; cell.textLabel.text= @"abc";
2。
NSIndexPath *myIndex=[self.tableView indexPathForCell:(UITableViewCell*)[bt superview]];
//如果按钮是加在cell上的contentView上
NSIndexPath *myIndex=[self.tableView indexPathForCell:(UITableViewCell*)[[bt superview]superview]];
NSLog(@"myIndex.section==%ld",myIndex.section);
NSLog(@"myIndex.row==%ld",myIndex.row);