美文网首页
UITableView cell个数为0时,仍然显示了分割线

UITableView cell个数为0时,仍然显示了分割线

作者: FicowShen | 来源:发表于2018-05-11 09:40 被阅读8次



也许你已经尝试了将separatorStyle属性设置为.none,但是问题依旧!

tableView.separatorStyle = .none



好吧,那请将tableView的style改为grouped。

UITableViewStyle.grouped



如果你还配置了tableHeaderView
那么就将tableFooterView也配置一下:

tableview.tableFooterView = UIView(frame: CGRect.zero)



参考文章:Remove the UITableViewCell separator for empty cells

相关文章

网友评论

      本文标题:UITableView cell个数为0时,仍然显示了分割线

      本文链接:https://www.haomeiwen.com/subject/gbgxdftx.html