tableview 左侧线 延伸到最左边
// tableview 左侧线 延伸到最左边
-(void)viewDidLayoutSubviews {
if ([(tableView) respondsToSelector:@selector(setSeparatorInset:)]) {
[(tableView) setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
}
if ([(tableView) respondsToSelector:@selector(setLayoutMargins:)]) {
[(tableView) setLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
}
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
这个(tableView)里写下你的 tableview 即可。