话不多说 直接贴代码
cell 点击后一闪而过 不会停留在被点击的cell上 代码如下
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
cell 点击为自定义颜色
//自定义cell被点击的颜色
UIColor *color = [RGB(244, 244, 244)colorWithAlphaComponent:.2f];
cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame];
cell.selectedBackgroundView.backgroundColor = color;
UIColor *color = [UIColor clearColor];