【问题标题】:Removed the reserved header view margin for Grouped UITableView删除了 Grouped UITableView 的保留页眉视图边距
【发布时间】:2015-06-24 05:07:01
【问题描述】:

默认情况下,分组表视图的每个部分都有保留的垂直边距。我不想要表格视图的页眉视图而是页脚视图,那么如何轻松降低边距?

【问题讨论】:

    标签: uitableview margin appdelegate


    【解决方案1】:

    重写下面tableview的delegate方法,直接去掉header view的margin。

    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
    {
        return 0.01; // Removed the section header margin. (couldn't be 0 here, weird)
    }
    

    【讨论】:

      猜你喜欢
      • 2016-11-23
      • 2022-07-25
      • 2018-07-06
      • 1970-01-01
      • 2023-04-01
      • 1970-01-01
      • 2015-10-12
      • 1970-01-01
      • 2011-09-16
      相关资源
      最近更新 更多