0

I know this has been asked before, but none of these solutions work, and that's the reason of my posting. Please do not close before considering my case.

  • My plist already has UIViewControllerBasedStatusBarAppearance = false.

  • I have already tried applying deltas, but to no result.

  • Changing the top level view frame in ViewWillAppear (like self.view.frame) did not succeed.

  • I thought of increasing the view height (storyboard attribute inspector), in combination with deltas, but my top level view X, Y are disabled in storyboard attribute inspector.

  • My main view doesn't have any children views because I load them into main view either dynamically or load them from XIBs which are again shared by more than view controllers. These XIBs provide layout for both Portrait and Landscape. I don't know what approach is ideal for this kind of configuration, but I would like it better if solution lies along these lines.

  • This approach worked partially, but gave me inconsistent results.

What makes the solution tricky is the fact that I have to support all 4 orientations - this is something I handle in code via didRotate and willRotate delegates for my other views, but failing to do it for statusbar.

Please help...

Community
  • 1
  • 1
Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89

2 Answers2

1

Could this link be of any help? You might have to use the new setEdgesForExtendedLayout: method to get this working consistently?

Also, have a look at these official docs if you haven't already done so.

Romain
  • 3,718
  • 3
  • 32
  • 48
0

I ended up writing my own function to shift my all subviews (remember, not top level views whose frame is fixated by IB).

It didn't spoil my work but imagine if this was the case for a very big project with so many screens, the limitations would have made it a nightmare.

Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89