IOS7以上用UINavigationController 导致tableview下移解决方法

产生下移的原因

ios7在Controller中增加了属性automaticallyAdjustsScrollViewInsets 默认为YES 

官方文档解释如下:

The default value of this property 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 NO if you want to manage scroll view inset adjustments yourself, such as when there is more than one scroll view in the view hierarchy.

Available in iOS 7.0 and later.
简单点说就是automaticallyAdjustsScrollViewInsets根据按所在界面的status bar,navigationbar,与tabbar的高度,自动调整scrollview的 inset,设置为no,不让viewController调整,我们自己修改布局即可~


你可能感兴趣的:(IOS7以上用UINavigationController 导致tableview下移解决方法)