转自:原文地址
# 改变iOS7上tableview的分割线长、颜色问题
if ([ self . tableView respondsToSelector : @selector (setSeparatorInset:)]) {
[ self . tableView setSeparatorInset : UIEdgeInsetsZero ];
[ self . tableView setSeparatorColor : kGetColor ( 18.0 , 18.0 , 18.0 )];
}
#去掉UITableView中的某cell条分割线
if (cell == nil ) {
cell = [[ UITableViewCell alloc ] initWithStyle :UITableViewCellStyleDefault reuseIdentifier :cellIdentifier];
[cell setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 10000000)];
}
#或
if (indexPath. section == 0 && indexPath. row == 1 ) {
[cell setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 10000000)];
}