2

I have stumbled across a weird problem when implementing a view container which is connected with child view controllers.

The hierarchy is the following: I have a UISplitViewController and in the MasterViewController I added a view container which is connected to a UIViewController which is embedded in a UINavigationController.

Storybaord

The outcome is the following:

The ChildViewController leaves a white space at the top which seems to be exactly as high as the status bar. How can I avoid that the status bar frame is shown in the child view controller?

I tried to set wantsFullScreenLayout for the ChildViewController and for its UINavigationController but it doesn't change anything.

I also tried to set the y offsets of the views to -20.0 points but that ends up in another problem.

Only when I set status bar hidden for the application it is not shown for the ChildViewController but that in turn also hides the status bar at the top of the UISplitViewController.

Would be glad for some hints.

outcome

Bins Ich
  • 1,822
  • 6
  • 33
  • 47

1 Answers1

0

Basically it looks like the top gap is the status bar. The statusbar at the moment is 'light' colored which is why it's not showing on top of the white background. Try changing the background color of the view controller to black or use one of the appearance callbacks to change the status bar to a darker color.

strange
  • 9,654
  • 6
  • 33
  • 47