cell的长度调整
2016-11-08 本文已影响0人
夏夏的一些事
- (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];
}