presentationControllerDidAttemptToDismiss(_:)
Notifies the delegate that a user-initiated attempt to dismiss a view was prevented.
Declaration
optional func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController)Parameters
- presentationController:
The presentation controller managing the adaptivity change.
Discussion
UIKit supports refusing to dismiss a presentation when the presentationController.isModalInPresentation returns true or presentationControllerShouldDismiss(_:) returns false.
Use this method to inform the user why the presentation can’t be dismissed, for example, by presenting an instance of UIAlertController.