UISplitViewController creates a UINavigationController for primary view controller. However, the left side of the primary view controller is hidden, so I check the view hierarchy. The reason is that the x value of origin of the navigation controller is -100. Any one has clue? Or is it only me? It kept showing this wrong position on any iOS projects of mine. Please help.
UISplitViewController's primary viewController set its origin.x as -100
I met some similar problem. As far as I understand, this is because SplitView tries to accomodate the 2 views by making room for the right. I did not find a really good workaround.
If you use in a larger screen, is there still this -100 offset ?
You should file a bug report.
This is the expected behavior. You should also see a safeAreaInsets.left
value of 100 to counter this. If you use the safeAreaInsets
or safeAreaLayoutGuide
to align your contents you should be able to accommodate this behavior naturally.