需要在iOS 7上使用NON-translucent条形的wantFullScreenLayout行为

spy*_*art 9 uinavigationbar uitoolbar ios ios7 xcode5

我希望能够让我的视图覆盖整个屏幕(在导航栏和工具栏后面),导航栏和工具栏的半透明属性设置为NO(我想要非透明栏).

通过设置wantsFullScreenLayout为YES,在iOS 7之前很容易实现.但是,在iOS 7中,我无法找到任何方法.有任何想法吗?

Aar*_*ron 33

wantsFullScreenLayout在iOS 7中已弃用.请尝试将视图控制器的edgesForExtendedLayout属性设置为UIRectEdgeAll

iOS 7 Transition Guide在第17页提到了一些新的视图控制器差异.但是,文档说明如果你使用不透明条(如你的情况),你还应该设置:

extendedLayoutIncludesOpaqueBars = YES;
Run Code Online (Sandbox Code Playgroud)

编辑

..因为默认情况下是NO.这与iOS 7 Transition Guide相冲突,后者指出默认值为YES.被警告.

  • 默认情况下,`edgesForExtendedLayout`设置为`UIRectEdgeAll`. (2认同)