美文网首页
tableView取消选中deselectRowAtIndexP

tableView取消选中deselectRowAtIndexP

作者: 彩虹下的笑颜 | 来源:发表于2018-08-23 17:00 被阅读0次

当点击cell 跳转到其他的页面,cell会处于选中状态,为了跳转后取消选中状态,可以加上deselectRowAtIndexPath这个方法

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NSLog(@"选中第 %ld 行", indexPath.row + 1);
}

相关文章

网友评论

      本文标题:tableView取消选中deselectRowAtIndexP

      本文链接:https://www.haomeiwen.com/subject/qasmiftx.html