iOS tableView移除某一行的分割线 让分割线宽度为整个cell的宽度

移除tableViewCell中某一行的分割线 有2种方法

1. 移除系统的分割线,自己定义每行的分割线      
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

2. 指定某行分割线隐藏              
     [cell setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, MAXFLOAT)];

让分割线的宽度和cell的宽度一致
cell.preservesSuperviewLayoutMargins = false;
cell.separatorInset = UIEdgeInsetsZero;
cell.layoutMargins = UIEdgeInsetsZero;

posted @ 2016-10-11 12:30  qqcc1388  阅读(3804)  评论(0编辑  收藏  举报