iOS8 之后 tableview separatorInset cell分割线左对齐,ios7的方法失效了
-(void)viewDidLayoutSubviews { if ([self.mytableview respondsToSelector:@selector(setSeparatorInset:)]) { [self.mytableview setSeparatorInset:UIEdgeInsetsZero]; } if ([self.mytableview respondsToSelector:@selector(setLayoutMargins:)]) { [self.mytableview 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]; } }