title: Hide StatusBar from MPMoviePlayerController
body: <p>I've been struggling with a very annoying problem all day long and I hope I could find help on this board.</p>
  
  <p>I'm using an MPMoviePlayerController to play a fullscreen movie on iPad and I can't figure how to remove the status bar which is always displayed despite all my efforts to make it go to hell.</p>
  
  <p>Here is the code of the method I use to display the movie :    </p>
  
  <pre><code>-(void)launchVideoFromButton:(id)sender{
  
           NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"movie01" ofType:@"m4v"];
           NSURL *videoPathURL = [NSURL fileURLWithPath:videoPath];
           moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoPathURL];
  
           [self.view addSubview:moviePlayer.view];
  
           moviePlayer.shouldAutoplay = YES;
           moviePlayer.movieSourceType = MPMovieSourceTypeFile;
  
  
           [moviePlayer setFullscreen:YES animated:YES];
           moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
  
           NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
           [notificationCenter addObserver:self selector:@selector(moviePlayerEvent:) name:MPMoviePlayerLoadStateDidChangeNotification object:moviePlayer];
  
      }
  
  
  
      -(void)moviePlayerEvent:(NSNotification*)aNotification{
  
           [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
           NSLog(@"%i", [UIApplication sharedApplication].statusBarHidden);
  
      }
  </code></pre>
  
  <p>In the console, I can see that moviePlayerEvent is fired when the movie appears but the statusbar is still there : [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO] seems to be inoperant. I've been trying to use the other MPMoviePlayerController notifications with no luck.</p>
  
  <p>Could anyone help me on that one?</p>
  
  <p>Thanks in advance.</p>