创建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