tableView中的cell,取消选中的颜色
2016-07-21 本文已影响125人
伊蕊飘零
取消选中cell的灰色
//取消选中cell的灰色的效果
//tableView 的代理方法
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}
或者
cell.selectionStyle = UITableViewCellSelectionStyleNone;