title: Disappearing status bar at the top after MPMoviePlayerController is closed
body: <p>Having an interesting little problem with my iPhone app. I have a view with a table and each cell, when clicked, plays a video fullscreen then when you press done, the video stops and goes back to the table view. The only problem is, when you press done within the first 2 or 3 seconds of the video loading, when the view goes back to the table view, the bar at the top of the screen that tells the time and battery strength etc is no longer there, its just a white space. But if you press done after the first few seconds, then when you go back to the table view, everything is absolutely fine! I have absolutely no idea why this is happening and the only thing I found on the internet is this which is some guy with pretty much exactly the same problem as me:</p>
  
  <p><a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/53020-disappearing-status-bar.html" rel="noreferrer">http://www.iphonedevsdk.com/forum/iphone-sdk-development/53020-disappearing-status-bar.html</a></p>
  
  <p>This lead me to try using:</p>
  
  <pre><code>[UIApplication sharedApplication].statusBarHidden = NO;
  </code></pre>
  
  <p>However this lead nowhere either.</p>
  
  <p>The code that is executed when they click on a video:</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:currentTitle ofType:@"m4v"];
  NSURL *url = [NSURL fileURLWithPath:path];
  movieController = [[MPMoviePlayerController alloc] initWithContentURL:url];
  [movieController setControlStyle:MPMovieControlStyleFullscreen];
  [movieController setFullscreen:YES];
  movieController.view.frame = self.view.bounds;
  [self.view addSubview:movieController.view];
  
  [[NSNotificationCenter defaultCenter]  addObserver:self selector:@selector(playbackFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
  </code></pre>
  
  <p>And the code that executes either when the video is done or when the user clicks done is:</p>
  
  <pre><code>NSLog(@"movieController moviePlayBackDidFinish");
  [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
  
  [movieController setFullscreen:NO animated:NO];
  [movieController.view removeFromSuperview];
  
  [movieController release];
  
  LiveEventsView *liveEventsView = [[LiveEventsView alloc] initWithNibName:@"LiveEventsView" bundle:nil];
  UIView *currentView = self.view;
  UIView *theWindow = [currentView superview];
  UIView *newView = liveEventsView.view;
  newView.frame = CGRectMake(0, 20, 320, 460);
  [currentView removeFromSuperview];
  [theWindow addSubview:newView];
  [UIApplication sharedApplication].statusBarHidden = NO;
  </code></pre>
  
  <p>If anybody can shed any light on this situation, I would be very grateful as it is extremely frustrating!</p>
  
  <p>Thanks,</p>
  
  <p>Matt</p>