splitViewController(_:shouldHide:in:)
Asks the delegate whether the first view controller should be hidden for the specified orientation.
Declaration
optional func splitViewController(_ svc: UISplitViewController, shouldHide vc: UIViewController, in orientation: UIInterfaceOrientation) -> BoolParameters
- svc:
The split view controller that owns the first view controller.
- vc:
The first view controller in the array of view controllers.
- orientation:
The orientation being considered.
Return Value
true if the view controller should be hidden in the specified orientation or false if it should be visible. If you do not implement this method, a value of true is assumed for portrait orientations and false is assumed for landscape orientations.
Discussion
The split view controller calls this method only for the first child view controller in its array. The second view controller always remains visible regardless of the orientation.
Prior to iOS 5.0, the first view controller was always hidden in portrait orientations and always shown in landscape orientations. If you do not implement this method in your delegate object, that default behavior remains in effect.