UINavigationController没有在IOS7上推送Contentview

NDM*_*DEV 2 uinavigationcontroller ios7

所以.刚刚开始将我的IOS代码转换为IOS7,并遇到了一些问题.

我有一个UINavigationController,其中包含一个ViewController,它在视图中有两个按钮.在7之前的IOS中,导航栏将视图向下推到导航栏下方,这样我就能看到它.在IOS 7中,UINavigationController不执行此操作,按钮位于导航栏后面.

这是IOS 7: IOS 7显示没有VC

这是旧的IOS 6视图:

IOS 6图片

我查看了ViewController.view.frame.origin.y并看到它的开头是0px(在IOS 7上)我确信它在那里,但在视图后面,因为我已经改变了按钮的原点并看到了它们.

小智 8

刚遇到同样的问题.尝试将此代码放在init中:

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;
Run Code Online (Sandbox Code Playgroud)

这在iOS 7过渡指南中提到:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/AppearanceCustomization.html

这里有一个更简洁的解释:http://www.brianjcoleman.com/ios7-weve-got-a-problem/