Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get a translucent status bar in iOS

Tags:

ios

info.plist

I'm trying to get the standard black translucent status bar in my iOS (iOS 6) app programmatically with no luck. I tried adding the key/value in my info.plist, as well as adding...

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

...to no effect. What else could be causing this?

like image 685
jfisk Avatar asked Dec 26 '22 03:12

jfisk


1 Answers

Thank you everyone for your input! You can set it in the info.plist, or use

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

Turns out it was translucent - there was just nothing underneath. What i was missing was this line in my view controller

self.wantsFullScreenLayout = YES;

and thats it!

like image 199
jfisk Avatar answered Dec 28 '22 18:12

jfisk