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];

       }

}

相關文章
相關標籤/搜索