MPMoviePlayer status bar hidden

Discussion in 'iOS Programming' started by nickculbertson, Apr 15, 2011.

  1. nickculbertson, Apr 15, 2011
    Last edited: Apr 15, 2011

    macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #1
    Hello,
    I have an app with the status bar hidden. I'm playing a video with the following code.

    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?

    [​IMG]

    Thanks,
    Nick
     

Share This Page