Search code examples
iosobjective-cmpmovieplayercontrollermpmovieplayer

Status bar overlaps Navigation Bar : MPMoviePlayerController


I am using MPMovieplayer as subview everything works fine but my issue is when i click on full screen video then coming back to small video frame then status bar overlaps navigation bar

Here's my code

// Setup player
MPMoviePlayerController* mp =
[[MPMoviePlayerController alloc] initWithContentURL:videoURL];
mpc = mp;
mpc.shouldAutoplay = YES;
[mpc prepareToPlay];
mpc.view.frame = CGRectMake(0, 0, 320, 320);

mpc.backgroundView.backgroundColor = [UIColor redColor];
[self.view addSubview:mpc.view];

enter image description here


Solution

  • I have solved by doing adding the key in .plist file

    'View controller-based status bar appearance' and set to NO.
    

    then set the statusbar hidden to NO