- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsMake(0, 45, 0, 0)];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
if ([self.tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableViewsetSeparatorInset:UIEdgeInsetsMake(0, 45, 0, 0)];
}
if ([self.tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableViewsetLayoutMargins:UIEdgeInsetsZero];
}
网友评论