iOS UITableView多出一部分空白
2016-09-08 09:03
323 查看
问题出现的原因:创建tableView时使用的style是UITableViewStylePlain
解决办法:
在创建tableView时,self.automaticallyAdjustsScrollViewInsets = NO;
官方文档是这么写的:
Discussion
Default value is
Set to
解决办法:
在创建tableView时,self.automaticallyAdjustsScrollViewInsets = NO;
官方文档是这么写的:
@property(nonatomic, assign) BOOL automaticallyAdjustsScrollViewInsets
Discussion
Default value is
YES, which allows the view controller to adjust its scroll view insets in response to the screen areas consumed by the status bar, navigation bar, and toolbar or tab bar.
Set to
NOif you want to manage scroll view inset adjustments yourself, such as when there is more than one scroll view in the view hierarchy.
相关文章推荐
- 【iOS】UITableview cell 顶部空白的n种设置方法
- Xcode 9 - UITableView头部多出了一部分空白
- iOS:去除UITableView的空白行
- iOS - UITableViewStyleGrouped样式顶部预留空白问题
- IOS UITableView 顶部有空白
- iOS --- 去掉UITableView中的空白行
- 【iOS】如何移除UITableView顶部的空白
- iOS开发笔记之四十四——UITableView的UITableViewStyleGrouped风格顶部空白的设置
- iOS UITableview cell 顶部空白区的去除
- iOS-83-UITableview消除顶部多余空白
- ios uitableview group模式顶部有个空白
- iOS UITableView去掉多余表格线,tableView去掉表头空白、改变导航栏背景色和标题属性
- iOS 7 中的UITableView顶部有一个空白区域,它的意义在哪里呢?
- 详解iOS开发中UITableview cell 顶部空白的多种设置方法
- iOS去掉UITableView分组时上方空白区域的方法
- iOS开发笔记之三十二——UITableView的UITableViewStyleGrouped风格顶部空白的设置
- iOS 去掉UITableView风格为group时候的最顶部的空白距离
- iOS 去掉UITableView风格为group时候的最顶部的空白距离
- iOS开发Storyboard中UITableView顶部默认空白 - 芒果iOS
- 详解iOS开发中UITableview cell 顶部空白的多种设置方法