iOS7以后设置Tableview分割线位置

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

// [cell setSeparatorInset:UIEdgeInsetsZero];

[cell setSeparatorInset:UIEdgeInsetsMake(0, 5, 0, 5)];

}

UIEdgeInsetsMake(上,左,下,右)自己可以调节,

UIEdgeInsetsZero是左右两边都距离边缘零;

现在不考虑iOS7了,直接用 setSeparatorInset 方法就可以了。

posted @ 2020-08-06 17:38  objectZhu  阅读(113)  评论(0编辑  收藏  举报