Asks the delegate to adjust the primary view controller and to incorporate the secondary view controller into the collapsed interface.
- iOS 8.0+
- tvOS 9.0+
The split view controller whose interface is collapsing.
The secondary view controller of the split view interface.
The primary view controller of the split view interface. If you implement the
primarymethod in your delegate, this object is the one returned by that method.
View Controller(for Collapsing:)
false to let the split view controller try and incorporate the secondary view controller’s content into the collapsed interface or
true to indicate that you do not want the split view controller to do anything with the secondary view controller.
This method is your opportunity to perform any necessary tasks related to the transition to a collapsed interface. After this method returns, the split view controller removes the secondary view controller from its
view array, leaving the primary view controller as its only child. In your implementation of this method, you might prepare the primary view controller for display in a compact environment or you might attempt to incorporate the secondary view controller’s content into the newly collapsed interface.
false tells the split view controller to use its default behavior to try and incorporate the secondary view controller into the collapsed interface. When you return
false, the split view controller calls the
collapse method of the primary view controller, giving it a chance to do something with the secondary view controller’s content. Most view controllers do nothing by default but the
UINavigation class responds by pushing the secondary view controller onto its navigation stack.
true from this method tells the split view controller not to apply any default behavior. You might return
true in cases where you do not want the secondary view controller’s content incorporated into the resulting interface.