presentationController
The presentation controller that’s managing the current view controller.
Declaration
var presentationController: UIPresentationController? { get }Discussion
If the view controller is managed by a presentation controller, this property contains that object. This property is nil if the view controller isn’t managed by a presentation controller.
If you’ve not yet presented the current view controller, accessing this property creates a presentation controller based on the current value in the modalPresentationStyle property. Always set the value of that property before accessing any presentation controllers.