获取当前cell

来源:互联网 发布:二叉树反转 java 编辑:程序博客网 时间:2024/04/27 02:21

获取当前cell

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {    if (indexPath.section == 0) {        [self selectCurrentIndexPath:self];    }}- (void)selectCurrentIndexPath:(id)sender {    NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];    cell.textLabel.text= @"正在修改";}

//获取cellNSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];


2 0