2

I have a navigation view controller. The root view hides the navigation bar using self.navigationController?.navigationBarHidden = true.

No matter what I do I cannot get thestatusBar to be translucent it is simply a white block that pushes my content below.

Juan Catalan
  • 2,299
  • 1
  • 17
  • 23
Ben_hawk
  • 2,476
  • 7
  • 34
  • 59
  • possible duplicate of [Can't get a translucent status bar in iOS](http://stackoverflow.com/questions/16568896/cant-get-a-translucent-status-bar-in-ios) – Vizllx Jun 01 '15 at 11:24
  • the above suggests self.wantsFullScreenLayout = YES; which is depreciated. – Ben_hawk Jun 01 '15 at 11:25
  • You want translucent or LightContent status bar? I can't find the translucent option in Xcode – Sohil R. Memon Jun 01 '15 at 11:52
  • *it is simply a white block that pushes my content below.* so you want to hide the status bar completely? Please be as clear and specific as possible. Add a picture to your question of the desired outcome if possible. – Daniel Storm Jun 01 '15 at 13:08
  • @Ben_hawk Did you manage to fix the issue? If yes, please post the solution. – Hedrack Sep 27 '16 at 04:11

1 Answers1

1

You can make status bar translucent as -

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

// set full screen layout in view controller class

self.wantsFullScreenLayout = YES;
Sanjay Mohnani
  • 5,947
  • 30
  • 46