tableview的cell点击和取消
2015-11-23 13:16 Y了个J 阅读(212) 评论(0) 编辑 收藏 举报#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;
}
}