0

I hid status bar in my app by setting [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; and by this code:

- (BOOL)prefersStatusBarHidden
{
    return YES;
}


By when I show the MPMediaPickerController modal with [self presentViewController:mpMediaPlayerController animated:YES completion:^{}];, the status bar is being show again.

How can I hide it?

Sergey
  • 47,222
  • 25
  • 87
  • 129

2 Answers2

1

Subclass the MPMediaPickerController and add:

- (BOOL)prefersStatusBarHidden {
return YES;
}
0

After getting back from MPMediaPlayerController again hide status bar in ViewWillAppear method

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

Hope it will work.

Bhumeshwer katre
  • 4,671
  • 2
  • 19
  • 29