让UITableviewCell 的分割线左对齐

if ([self.WQAdressListTableView respondsToSelector:@selector(setSeparatorInset:)])
{
[self.WQAdressListTableView setSeparatorInset: UIEdgeInsetsZero];
}
if ([self.WQAdressListTableView respondsToSelector:@selector(setLayoutMargins:)])
{
[self.WQAdressListTableView setLayoutMargins: UIEdgeInsetsZero];
}

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPat
{
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setSeparatorInset:)]){
[cell setSeparatorInset:UIEdgeInsetsZero];
}
}

posted @ 2016-07-11 09:59  GJR  阅读(216)  评论(0编辑  收藏  举报