开发者社区 问答 正文

iOS UITableView 实现去除Section的分割线,保留Cell的分割线

screenshot
screenshot
首先我觉得你要先把背景颜色设置好,这样你不会把section的分割线或者tableview的背景颜色混淆
通常我们在做自定义的cell或者section header and footer,我们尽量用一个高度为1-3point的view来代替,这样我的话我们就有更多可以操控的空间。就是我们通常说的障眼法
如果你还解决不了最好发代码上来

展开
收起
a123456678 2016-07-27 15:15:58 5193 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • + (void)hideEmptySeparators:(UITableView *)tableView
    {
      UIView *v = [[UIView alloc] initWithFrame:CGRectZero];
     [tableView setTableFooterView:v];
    }
    2019-07-17 20:00:39 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等