1

I have an app where all of the views, except one, needs a status bar displayed on top. After spending time googling and searching here, I cannot find a solid answer that works. Right now, with View controller-based status bar appearance set to YES, and

 -(BOOL)prefersStatusBarHidden
{
    return YES;
}

in my 'hidden status bar' ModalViewController, the upper half of my Navigation Item is cut off.

https://i.stack.imgur.com/m2xc2.png

Currently, the rest of the app's view's doesn't have a status bar. Suggestions?

Keaton
  • 127
  • 14
128keaton
  • 17
  • 5
  • Um, you probably meant to set it to `YES` as you wanted precisely "view controller-based status bar", right ? And you definitely wanted to call `setNeedsStatusBarAppearanceUpdate` to be able to use the values other than default, as the documentation says. – A-Live Apr 08 '14 at 19:25
  • @A-Live yes, I typo'ed that in the post. I called an update too. Still not working. – Keaton Apr 08 '14 at 21:28
  • Make sure your `self.view.frame` is actually 0, not 20 points. – Sergey Grischyov Apr 08 '14 at 22:14
  • @SergiusGee the black bar is gone now, the status bar is shown, but I need it gone. – Keaton Apr 08 '14 at 22:16
  • set `prefersStatusBarHidden` to return `YES` and call `setNeedsStatusBarAppearanceUpdate` in `ViewDidAppear` or `WillAppear` in that VC. – Sergey Grischyov Apr 08 '14 at 22:23
  • @SergiusGee while View controller-based status bar is set to YES? If so, its not working :(. – Keaton Apr 09 '14 at 02:32

0 Answers0