MPMoviePlayerViewController and status bar hidden

Discussion in 'iOS Programming' started by ChamY, Jun 25, 2010.

  1. ChamY macrumors newbie

    Joined:
    Jun 25, 2010
    #1
    Hi,

    I have a problem with the new MPMoviePlayerViewController (IOS > 3.2).
    My app use the property : Status bar is initially hidden set to YES

    I use this code to lunch my videoplayer:
    Code:
    NSBundle *bundle = [NSBundle mainBundle];
    NSString *path =@"test";
    	
    NSString *moviePath = [bundle pathForResource:path ofType:@"mp4"];
    NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
    
    MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
    [self  presentMoviePlayerViewControllerAnimated:moviePlayer];
    
    This works great, but the status bar is shown in this viewController. and if user tap on "Done" button (video player control bar), the view disappear and a white bar appear at the top of the screen (see screenshot attached).

    before:

    [​IMG]

    after:

    [​IMG]

    I dont know how to redraw or hide this status bar .

    it's easy to reproduce this problem. Just create a viewController and set YES to the hidden status bar. Just lunch the MPMoviePlayerViewController and click on done button.

    Help me please.
     

    Attached Files:

  2. ChamY thread starter macrumors newbie

    Joined:
    Jun 25, 2010
    #2
    problem solved:

    [self setWantsFullScreenLayout:YES];
     

Share This Page