MPMoviePlayerViewController and status bar hidden

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

  1. ChamY macrumors newbie

    Jun 25, 2010

    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:
    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).





    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

    Jun 25, 2010
    problem solved:

    [self setWantsFullScreenLayout:YES];

Share This Page