隐藏单个Cell分割线

参考:http://stackoverflow.com/questions/8561774/hide-separator-line-on-one-uitableviewcell

CGFloat width = CGRectGetWidth(cell.bounds);
if (kIsIOS8) {
    cell.separatorInset = UIEdgeInsetsMake(0, width, 0, 0); // 向左偏移
    cell.indentationWidth = -width; // adjust the cell's content to show normally
    cell.indentationLevel = 1;
}
else {
    cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, width);
}

你可能感兴趣的:(隐藏单个Cell分割线)