tableView上出现空白的解决办法

创建tableView后,出现如下效果

tableView上出现空白的解决办法     tableView上出现空白的解决办法

解决办法:

self.automaticallyAdjustsScrollViewInsets = NO;

个人认为,应该是取消系统默认行为,保证界面区域问题(主要针对iOS7.0以后)

产生原因:

automaticallyAdjustsScrollViewInsets

Specifies whether or not the view controller should automatically adjust its scroll view insets.

@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 toNO if you want to manage scroll view inset adjustments yourself, such as when there is more than one scroll view in the view hierarchy.

Availability

  • Available in iOS 7.0 and later.

Declared In

UIViewController.h

上一篇:实测Eclipse连接小米2S调试问题


下一篇:Kali Linux 初始化配置:Apache2 /SSH /FTP