1.取消多余的分割线
self.tableView?.tableFooterView = UIView()
self.tableView.tableFooterView = [[UIView alloc] init];
2.处理分割线对齐问题
//然后在UITableView的代理方法中加入以下代码
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell respondsToSelector:@selector(setSeparatorInset:)])
{
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)])
{
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
self.tableView.separatorInset = UIEdgeInsetsMake(0, 100, 0, 0);