Hi,
I have configured my UISplitViewController to show three columns next to each other when the iPad is in landscape mode:
However, when the iPad is in portrait mode, I'd like the same behavior as the .automatic display mode and split behavior.
Right now, it shows the three columns even in portrait mode, which doesn't look right. Is it a bug or is there some way to set the display mode and split behavior for different iPad orientations?
Thanks.
I have configured my UISplitViewController to show three columns next to each other when the iPad is in landscape mode:
Code Block [...] splitViewController.preferredDisplayMode = .twoBesideSecondary splitViewController.preferredSplitBehavior = .tile
However, when the iPad is in portrait mode, I'd like the same behavior as the .automatic display mode and split behavior.
Right now, it shows the three columns even in portrait mode, which doesn't look right. Is it a bug or is there some way to set the display mode and split behavior for different iPad orientations?
Thanks.
I suggest subclassing UISplitViewController, overriding -viewWillTransitionToSize:withTransitionCoordinator:, and updating preferredDisplayMode and preferredSplitBehavior according to the destination size. I don't recommend looking for interface orientation, because for example, your app may show up on the iPad half and half with another app.