美文网首页
隐藏单个Cell分割线

隐藏单个Cell分割线

作者: WeeverLu | 来源:发表于2016-06-01 16:58 被阅读55次

参考: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分割线

      本文链接:https://www.haomeiwen.com/subject/wbmhdttx.html