开发者社区> 问答> 正文

请问下面没有数据的cell中为什么还会有横线

screenshot
部分代码如下

_AttendTableView = [[UITableView alloc] initWithFrame:CGRectMake(0.0f, 64.0f, self.view.bounds.size.width, [[UIScreen mainScreen] applicationFrame].size.height - self.navigationController.navigationBar.bounds.size.height) style:UITableViewStylePlain];

_AttendTableView.dataSource=self; 

_AttendTableView.delegate=self; 

[self.view addSubview:_AttendTableView]; 

[_AttendTableView release]; 

展开
收起
杨冬芳 2016-06-29 15:11:39 1536 0
1 条回答
写回答
取消 提交回答
  • IT从业

    tableView默认是有分割线的,
    [ _AttendTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    这样就可以消除了:

    UIView *view = [UIView new];

    view.backgroundColor = [UIColor clearColor];

    _AttendTableView.tableFooterView = view;

    希望对你有帮助!

    2019-07-17 19:49:10
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载