title: iOS 8 UIModalPresentationPageSheet with status bar hidden
body: <p>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:</p>
  
  <pre><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];
  </code></pre>
  
  <p>I am getting like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Y92Lx.png" alt="enter image description here"></p>
  
  <p>But the desired output is </p>
  
  <p><img src="https://i.stack.imgur.com/Q7Hzs.png" alt="enter image description here"></p>
  
  <p>Please help !!</p>