I have a problem with my code that plays a video file. Whenever I play the file in fullscreen mode the playback doesn't occupy all of my screen. Here is the relevant code:
NSURL *url = [NSURL fileURLWithPath:@"Somefile.mov"];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[moviePlayer setFullscreen:YES];
moviePlayer.view.frame = self.switchView.frame;
[self.switchView addSubview:moviePlayer.view];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(playbackStateDidChange:)
name:MPMoviePlayerPlaybackStateDidChangeNotification
object:moviePlayer];
[moviePlayer prepareToPlay];
[moviePlayer play];
Here is the output I get: