Atul Bhatia Atul Bhatia - 3 months ago 19
iOS Question

ios 7 status bar not inheriting nav bar color

I am having trouble figuring out how to get the status bar in ios 7 to use the color of my nav bar. I am using

UINavigationController
in conjunction with the
SWRevealController
library for the sliding menu nav.

This is how a page looks right now:

enter image description here

I want the status bar to inherit the gray color of the nav bar. How can I do this?

Answer

You can modify your project's Info.plist and set 'View controller-based status bar appearance' as NO

In AppDelegate you have to add

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

to AppDelegates didFinishLaunchingWithOptions Method.

Hopefully it will works for you.

Comments