Asks your delegate for the custom presentation controller to use for managing the view hierarchy when presenting a view controller.
- iOS 8.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The view controller being presented.
The view controller that is presenting the view controller in the
presentedparameter. The object in this parameter could be the root view controller of the window, a parent view controller that is marked as defining the current context, or the last view controller that was presented. This view controller may or may not be the same as the one in the
sourceparameter. This parameter may also be
nilto indicate that the presenting view controller will be determined later.
The view controller whose
presentmethod was called to initiate the presentation process.
View Controller: animated: completion:
The custom presentation controller for managing the modal presentation.
When you present a view controller using the
UIModal presentation style, the system calls this method and asks for the presentation controller that manages your custom style. If you implement this method, use it to create and return the custom presentation controller object that you want to use to manage the presentation process.
If you do not implement this method, or if your implementation of this method returns
nil, the system uses a default presentation controller object. The default presentation controller does not add any views or content to the view hierarchy.