处理 tableViewCell 中间的线条到最左边 uitableview separator full width

来源:互联网 发布:三国如龙传网络不给力 编辑:程序博客网 时间:2024/05/22 13:43
-(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];    }}-(void)viewDidLayoutSubviews{    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {        [self.tableView setSeparatorInset:UIEdgeInsetsZero];    }    if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {        [self.tableView setLayoutMargins:UIEdgeInsetsZero];    }}
0 0
原创粉丝点击