Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need wantsFullScreenLayout behavior with NON-translucent bars on iOS 7

I want to be able to have my view cover the whole screen (go behind the navigation and tool bars) with the translucent property of the navigationBar and toolbar set to NO (I want non-transparent bars).

This was easy to accomplish prior to iOS 7 by setting wantsFullScreenLayout to YES. However, in iOS 7, I can't find any way of doing this. Any ideas?

like image 384
spybart Avatar asked Oct 04 '13 21:10

spybart


1 Answers

wantsFullScreenLayout is deprecated at iOS 7. Try setting your view controller's edgesForExtendedLayout property to UIRectEdgeAll

The iOS 7 Transition Guide mentions a few of the new view controller differences on page 17. However, the documentation states that if you're using opaque bars (as in your case) you should also set:

extendedLayoutIncludesOpaqueBars = YES;

EDIT

.. because by default it is NO. This conflicts with the iOS 7 Transition Guide which states the default value is YES. Be warned.

like image 147
Aaron Avatar answered Nov 18 '22 07:11

Aaron