Closed mortyccp closed 3 years ago
Creating Custom Presentations in View Controller Programming Guide for iOS
UIKit provides presentation controllers for the standard presentation styles. When you set the presentation style of a view controller to UIModalPresentationCustom and provide an appropriate transitioning delegate, UIKit uses your custom presentation controller instead.
If you want to use UIPresentationController
in the display process of a view controller, you need to present the view controller with a method like presentViewController:animated:completion:
.
addChildViewController
just create a parent-child relationship between two view controllers, it actually doesn't involve view controller transition.
How can we use custom
UIPresentationController
in customContainerViewController
?If we actually cannot do that, can I mimic the
ContainerViewController
behaviour with a customUIViewController
usingpresentViewController
and setting thetransitionDelegate
of theChildViewController
/PresentedViewController
to theCustomViewController
. Combining with thePresentationController
, can I achieve the same behaviour asaddChildViewController
?