tableview的cell点击和取消

#pragma mark - 选择cell;

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

    

     [tableView deselectRowAtIndexPath:indexPath animated:YES];

    

    FollowUpSelectViewCell *cell = (FollowUpSelectViewCell *)[tableView cellForRowAtIndexPath:indexPath];

    

    //判断tableviewcell的打勾状态;

    if (cell.accessoryType == UITableViewCellAccessoryNone)

    {

        cell.accessoryType = UITableViewCellAccessoryCheckmark;

        

//        SelectedFieldModel *seletM = cell.selectM;

//        NSLog(@"seletM.name ---- %@",seletM.name);

        

        

    }

    else if (cell.accessoryType == UITableViewCellAccessoryCheckmark)

    {

        cell.accessoryType = UITableViewCellAccessoryNone;

        

    }

}

原文地址:https://www.cnblogs.com/yyj900165/p/4988138.html