1
votes

I am building my app on iOS 8 and getting problem with status bar visibility when UIViewController is presented with modalPresentationStyle = UIModalPresentationPageSheet. I read the documentation that new API true value of "modalPresentationCapturesStatusBarAppearance" used to hide status bar when modal presentation is presented, but I am getting no result with this in this modalPresentationStyle. In my application I am not showing status bar. It was working fine with this style in iOS 7 but when it comes to iOS 8 it is giving problem. Here is my code:

UINavigationController  *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
nav.modalPresentationStyle = UIModalPresentationPageSheet;
nav.modalTransitionStyle=UIModalTransitionStyleCoverVertical;
nav.modalPresentationCapturesStatusBarAppearance = YES; // To hide status bar, doest work with UIModalPresentationPageSheet style
[self.navigationController presentViewController:nav animated:YES completion:NULL];

I am getting like this:

enter image description here

But the desired output is

enter image description here

Please help !!

1
Have you found a fix to this problem? I am also having ios8 only issues with the PageSheet style and status bar hidden. Thanks - rwyland

1 Answers

0
votes

Use nav.modalPresentationStyle = UIModalPresentationPopover only