PDA

View Full Version : MPMoviePlayer status bar hidden




nickculbertson
Apr 15, 2011, 08:04 AM
Hello,
I have an app with the status bar hidden. I'm playing a video with the following code.


-(IBAction) movieiphone{
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"lessonmobile" ofType:@"m4v"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[theMovie play];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];

}


If the video plays entirely the main view is reloaded on the screen as it was before I played the movie. The problem I am facing is that if I push the done button in the movie controller the main view is modally reloaded with a blank space where the status bar would normally be. Any thoughts on how to have the main view to appear as it did before (without the space for the status bar) if the done button is pressed?

http://4.bp.blogspot.com/-OkcHVlqLkx8/TahLIvRgtvI/AAAAAAAAAFU/84JoK2Og3LE/s1600/Screen+shot+2011-04-15+at+8.40.39+AM.png

Thanks,
Nick