Sergey Grishchev
Sergey Grishchev

Reputation: 12051

Hiding status bar in one view hides it in all views

I'm using this code [[UIApplication sharedApplication] setStatusBarHidden:YES]; in viewDidLoad and nothing else, to hide the status bar in my modal view. But when I come back to the previous view with [self dismissViewControllerAnimated:YES completion:nil]; the status bar is hidden in all the views. Of course I don't want this behavior. I understand that this is a simple question and might be a possible duplicate. Anyway, thanks in advance!

Upvotes: 0

Views: 186

Answers (1)

ohr
ohr

Reputation: 1727

Remember that sharedApplication (singleton) is your application, so you just told your app to hide the status bar. If you want it to show somewhere else, you need to setStatusBarHidden:NO there. Hope this helps.

Upvotes: 4

Related Questions