The problem happens only with the iPad with the master column having a negative origin.
- Create
UISplitViewControllerwith Master and Detail view controllers. - Use
UITableViewControlleror regularUIViewControllerwithUITableViewsubview for the Detail view controller. - Add
UISegementedControlabove the table view. - Build and run on iPad, look at the layout.
The issue is happening even without the segmented control, but with step 3, it's even more obvious.
The problem is even visible in Storyboard when setting Simulated Metrics Size to "Primary":
I have tried creating UISplitViewController with Storyboard and programmatically inside AppDelegate.
self.window?.rootViewController = splitViewController
self.window?.makeKeyAndVisible()
Still, the same behaviour.
Changing the column width does not help. Found this question but I don't know how to fix it, and the "fix" seems like a hack rather than a long-term fix.
The primary column contains a 100-pt offscreen buffer which can be read by calling view’s safeAreaInsets.left. This will return a value of 100, and adjusting the frames using this value resolves this issue.
I am running on the iOS 16 Simulator, using Xcode 14.0.1. The project dependency target is set to iOS 12.
I should mention that the problem is only happening when using the "Double Column" style for the UISplitViewController configuration during init, either in Storyboard or inside the initialiser. Not using the "Double Column" is deprecated and causing visual issues in the Interface Builder.

