UItableViewCell的分割线顶头显示

来源:互联网 发布:提醒事情的软件 编辑:程序博客网 时间:2024/04/29 01:56
实现如下代理方法即可
- (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.tableViewOne respondsToSelector:@selector(setSeparatorInset:)]) {        [self.tableViewOne setSeparatorInset:UIEdgeInsetsZero];    }            if ([self.tableViewOne respondsToSelector:@selector(setLayoutMargins:)]) {        [self.tableViewOne setLayoutMargins:UIEdgeInsetsZero];    }}

0 0
原创粉丝点击