Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 Status Bar Disappears After Playing a Video

I'm not the only one who's having this kind of issue. Here's another one, Status bar height changes after playing a Youtube video. But I can't still find a way to solve this. I'm not using MPMoviePlayerController. I think I just have to use these codes;

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];

self.webView.frame = CGRectMake(0.0,
                                20.0,
                                self.webView.frame.size.width,
                                self.webView.frame.size.height);

But it's not so working.

Please see this images below..

enter image description here

At first this is what my "Home" looks like.

enter image description here

Status bar disappears while playing a video from Youtube/Vimeo (or whatever).

enter image description here

When I go back, see them bunched up.

enter image description here

Found out that FB figure out how to handle this. They had their status bar appears right there.

Any help???

Cheers in advance!

like image 485
caribbean Avatar asked Oct 10 '13 09:10

caribbean


1 Answers

I don't know if apply for your case, but in my case the status bar appears after I loaded a UIImagePickerController and change my default screen orientation.

I fix this situation add application.statusBarHidden = YES; inside appDelegate like this:

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
// Detect if I need to hide the StatusBar (optional)
if (iNeedToHide == YES) {  
    application.statusBarHidden = YES;
}
return UIInterfaceOrientationMaskLandscape;

}

I hope this helps you.

like image 54
Beto Avatar answered Sep 29 '22 06:09

Beto