Reputation: 81
I'm using a MPMoviePlayerViewController
to show a movie. I have set the MPMoviePlayerController
to fullscreen. Now I want to hide the status bar as soon as the fullscreen controls start to fade out and show the status bar if the controls are visible.
If I'm using a UIWebView
all this happens automatically. The status bar fades in and out together with the controls. How would you do that with a MPMoviePlayerController
?
Thanks for any help.
Upvotes: 2
Views: 5135
Reputation: 18855
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
The animated bit is now deprecated so just use:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
Upvotes: 0
Reputation: 27597
This will happen automagically for you once you use the MPMoviePlayerController
property controlStyle
and set to MPMovieControlStyleFullscreen
.
player.controlStyle = MPMovieControlStyleFullscreen;
Upvotes: 0
Reputation: 3733
You can use to hide status bar
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
and to show status bar
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
Upvotes: 3