iOS 11 系统下tableView顶部多出一些留白的解决方法
2017-11-14 16:58
671 查看
最近iOS 11 下来之后需要适配系统,故此测试系统发现同一种机器上tableView与顶部控件,或者导航栏之间的有大量的留白;
这个问题是有的界面有,有的界面无;
修改与导航栏或者其他控件之间的距离也没有什么用;
具体如下;
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
return nil;
}
有时候tableview的底部视图也会出现此现象对应的修改就好了
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return nil;
}
2、tableView的section之间间距变大问题:
解决办法:初始化的时候增加以下代码
self.tableView.estimatedRowHeight =0;
self.tableView.estimatedSectionHeaderHeight =0;
self.tableView.estimatedSectionFooterHeight =0;
这个问题是有的界面有,有的界面无;
修改与导航栏或者其他控件之间的距离也没有什么用;
具体如下;
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
return nil;
}
有时候tableview的底部视图也会出现此现象对应的修改就好了
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return nil;
}
2、tableView的section之间间距变大问题:
解决办法:初始化的时候增加以下代码
self.tableView.estimatedRowHeight =0;
self.tableView.estimatedSectionHeaderHeight =0;
self.tableView.estimatedSectionFooterHeight =0;
相关文章推荐
- 三十一,iOS 11系统下tableView顶部多出一些留白的解决方法
- 解决tableview顶部留白一段的处理方法
- 解决 ios 11 和 h5 页面在 wkwebview 上显示, footer 设置 bottom 为 0 时, 顶部会出现留白
- 解决tableview顶部留白一段的处理方法
- IOS 解决scoryboard上tableview、collection view顶部有空白问题
- 在iOS 中改变tableView的frame让tableView回到顶部的方法
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- tableView 顶部高出一部分解决方法
- iOS -- tableView顶部留白
- 关于TableView上有一段留白的解决方法
- iOS TableView顶部上方留白的问题
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- iOS-80-解决主页tableview顶部多出一块
- ios:当你碰到tableview cell里报nan错误时的解决方法
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- IOS 7 8中tableview分割线左边不到头的解决方法
- tableView 顶部高出一部分解决方法
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- tableview的顶部有一部分空白区域,并不是Cell的解决方法。