The nearest popover presentation controller that is managing the current view controller.
SDKs
- iOS 8.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
@property(nonatomic, readonly) UIPopover Presentation Controller *popoverPresentationController;
Discussion
If the view controller or one of its ancestors is managed by a popover presentation controller, this property contains that object. This property is nil
if the view controller is not managed by a popover presentation controller.
If you created the view controller but have not yet presented it, accessing this property creates a popover presentation controller when the value in the modal
property is UIModal
. If the modal presentation style is a different value, this property is nil
.