-(void)viewDidLayoutSubviews {
if ([self.tableview respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableview setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.tableview respondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableview 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];
}
}
转载于:https://my.oschina.net/u/2418271/blog/547508