1. 对于 UITableViewCellAccessoryCheckmark,标记问题
解决方法:创建一个NsmultableArray 来记录所选择的indexpath.row
在创建cell时,判断
if ([_checkArray containsObject:[NSNumber numberWithInt:indexPath.row]]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}else{
cell.accessoryType = UITableViewCellAccessoryNone;
}
if else一定要写全
和创建
if (indexPath.row %2 == 0) {
cell.backgroundColor = [UIColor greenColor];
}else{
cell.backgroundColor = [UIColor clearColor];
}
else不可缺少
http://www.cocoachina.com/ask/questions/show/1916
http://blog.youkuaiyun.com/yesjava/article/details/8075720