tableview左边短

if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)])spa

{代理

     [self.tableView setSeparatorInset:UIEdgeInsetsZero];orm

}it

if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)])table

 {select

     [self.tableView setLayoutMargins:UIEdgeInsetsZero];方法

}
margin

而后在UITableView的代理方法中加入如下代码top

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

{

    if ([cell respondsToSelector:@selector(setSeparatorInset:)])

       {

          [cell setSeparatorInset:UIEdgeInsetsZero];

       }

    if ([cell respondsToSelector:@selector(setLayoutMargins:)])

       {

         [cell setLayoutMargins:UIEdgeInsetsZero];

       }

}

相关文章
相关标签/搜索