On iOS 13 Beta 5, I currently have problems with my UISplitView on iPhones.
My app starts with the detailsview off my splitview not with my masterview (look at the p
Warren Milward's answer helped me to guide me in the right direction, but actually I got it working with viewDidLoad()
.
I ended up using a subclass for the UISplitViewController
and set the required values in viewDidLoad()
as well as the delegate calls here.
class CustomSplitViewController: UISplitViewController, UISplitViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
self.delegate = self
self.preferredDisplayMode = .allVisible
}
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool {
return true
}
}