1.把UITableViewCell的SelectionStyle属性设置为:UITableViewCellSelectionNone。
cell.selectionStyle = UITableViewCellSelectionStyleNone;
- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//可选UITableViewCell
if (true) {
return indexPath;
}
//不可选UITableViewCell
return nil;
}
原文:http://my.oschina.net/simple2012/blog/531015