Wing的小站

  • 首页
  • IT新闻
  • 技术文章
  • 生活随笔
  • 休闲娱乐
  • 个人作品
  • 留言板
  • 关于博主
JavaFX,Unity3D,Android,IOS,技术教程,生活随笔
  1. 首页
  2. 技术文章
  3. 正文

IOS UITableView去掉某个Cell的分割线

2018年4月12日 7502点热度 0人点赞 1条评论

大家都知道,UITableView如果要去掉多余的Cell和分割线可以使用如下代码:

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

倘若要去掉所有的分割线,那么可以使用如下代码:

tableView.separatorStyle = .none

如果是想去掉某个Cell的分割线呢?我们可以使用如下方法:

cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, cell.bounds.width)

这样各种情况我们都能够适应,最不济,还可以去掉所有的分割线,然后在自定义Cell中自定义分割线。

标签: IOS UITableView
最后更新:2018年4月12日

wing1314

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

  • 匿名

    :persevering: :drooling: :neutral: :cool: :mad: :idea: :surprised: :redface:

    2021年3月10日
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复

    COPYRIGHT © 2023 Wing的小站. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    鄂ICP备17006951号-1

    42011102000591