2

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.

Jay Bhalani
  • 4,142
  • 8
  • 37
  • 50
Marlon
  • 71
  • 1
  • 4

3 Answers3

3

You can use to hide status bar

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];

and to show status bar

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
Jatin Patel - JP
  • 3,725
  • 2
  • 21
  • 43
0
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];

The animated bit is now deprecated so just use:

[[UIApplication sharedApplication] setStatusBarHidden:YES];
Vikas S Singh
  • 1,748
  • 1
  • 14
  • 29
Adam Waite
  • 19,175
  • 22
  • 126
  • 148
  • It's not the animated bit that is deprecated, but that form has been replaced with another that requires the style of animation to specified: `setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation` – big_m Jun 08 '14 at 15:19
0

This will happen automagically for you once you use the MPMoviePlayerController property controlStyle and set to MPMovieControlStyleFullscreen.

player.controlStyle = MPMovieControlStyleFullscreen;
Till
  • 27,559
  • 13
  • 88
  • 122