TableView使默认下划线从最左边开始

来源:互联网 发布:飞飞cms安装教程 编辑:程序博客网 时间:2024/06/07 05:54
   //创建tableView时添加    if ([tableV respondsToSelector:@selector(setSeparatorInset:)]) {        [tableV setSeparatorInset:UIEdgeInsetsZero];    }    if ([tableV respondsToSelector:@selector(setLayoutMargins:)]) {        [tableV setLayoutMargins:UIEdgeInsetsZero];    }

- (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];    }}


0 0
原创粉丝点击