美文网首页
tableView留白处理

tableView留白处理

作者: CoderZXS | 来源:发表于2021-04-15 17:01 被阅读0次

IOS 11 系统下TABLEVIEW顶部多出一些留白的解决方法

适配iOS11--contentInsetAdjustmentBehavior

  • (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.01;
    }
  • (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 0.01;
    }
  • (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return nil;
    }
  • (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return nil;
    }

tab.estimatedRowHeight = 0;
tab.estimatedSectionFooterHeight = 0;
tab.estimatedSectionHeaderHeight = 0;

if #available(iOS 11.0, *) {
contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = false;
};

相关文章

  • tableView留白处理

    IOS 11 系统下TABLEVIEW顶部多出一些留白的解决方法[https://freesion.com/art...

  • 关于ios11和iphoneX ScrollView的适配

    1.由于tableView 头部视图和尾部视图出现一块留白问题 有两种办法去掉留白: 1)tableView的st...

  • iOS 11 适配汇总(文章摘录)

    【1 - TableView 顶部 多出 留白 Section Header Footer】 【原文链接:http...

  • ios tableview顶部留白

    iOS11上废除了automaticallyAdjustsScrollViewInsets iOS11上对滚动视图...

  • 处理navigationBar带来的偏移留白的问题

    navigationBar留白的原因: 上面是在导航视图内Push进来的以“TableView”(没有Scroll...

  • 家常闲话

    留白 发现了一款图片处理软件“留白”很喜欢,处理后的效果给人一种简洁舒服的感受,大家可以试试。 生活里也需要些留白...

  • iOS tableView 顶部留白的问题

    看到这个问题,其实我已经清楚了个问题的大概,boss的ipone手机系统是10.3的,可关键是我在编写代码的时候就...

  • TableView的分组问题(分组留白)

    在开发中我们总是少不了要使用TableView的分组,可是细心地的你会发现,分完组以后,在组间总会有一部分空白,显...

  • PPT留白处理,白而不空

    留白,是一种时尚,也是一种设计,留白即留出可呼吸的空间,营造出艺术气息。 留白处理,就好比我们坐地铁,挤火车,你是...

  • iOS11需要注意啦

    1.适配TableView 在AppDelegate配置一次即可,方法如下 2.页面有时上部会留白 可以设置aut...

网友评论

      本文标题:tableView留白处理

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