How can I detect if the UISplitViewController
is currently just showing 1 view controller or it's in dual-pane with 2 views controllers shown side-by-side?
The split view controller reflects the actual display mode in the displayMode property:
AllVisible: The primary and secondary UIViewControllers are displayed side-by-side.
PrimaryHidden: The primary UISplitViewController is hidden.
PrimaryOverlay: The primary UISplitViewController overlays the secondary, which is partially visible.
When the isCollapsed property is true, the value of displayMode property is ignored. A collapsed split view interface contains only one view controller so the display mode is superfluous.
Resume: To find out the detailed situation on screen use isCollapsed property and (if isCollapsed = false) displayMode property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With