Interface UIAdaptivePresentationControllerDelegate

    • Method Detail

      • adaptivePresentationStyleForPresentationController

        default long adaptivePresentationStyleForPresentationController​(@NotNull
                                                                        @NotNull UIPresentationController controller)
        For iOS 8.0, the only supported adaptive presentation styles are UIModalPresentationFullScreen and UIModalPresentationOverFullScreen.
      • adaptivePresentationStyleForPresentationControllerTraitCollection

        default long adaptivePresentationStyleForPresentationControllerTraitCollection​(@NotNull
                                                                                       @NotNull UIPresentationController controller,
                                                                                       @NotNull
                                                                                       @NotNull UITraitCollection traitCollection)
        Returning UIModalPresentationNone will indicate that an adaptation should not happen. API-Since: 8.3
      • presentationControllerViewControllerForAdaptivePresentationStyle

        @Nullable
        default @Nullable UIViewController presentationControllerViewControllerForAdaptivePresentationStyle​(@NotNull
                                                                                                            @NotNull UIPresentationController controller,
                                                                                                            long style)
        If this method is not implemented, or returns nil, then the originally presented view controller is used.
      • presentationControllerWillPresentWithAdaptiveStyleTransitionCoordinator

        default void presentationControllerWillPresentWithAdaptiveStyleTransitionCoordinator​(@NotNull
                                                                                             @NotNull UIPresentationController presentationController,
                                                                                             long style,
                                                                                             @Nullable
                                                                                             @Nullable UIViewControllerTransitionCoordinator transitionCoordinator)
        If there is no adaptation happening and an original style is used UIModalPresentationNone will be passed as an argument. API-Since: 8.3
      • presentationControllerDidAttemptToDismiss

        default void presentationControllerDidAttemptToDismiss​(@NotNull
                                                               @NotNull UIPresentationController presentationController)
        Called on the delegate when the user attempts to dismiss the presentation, but user-initiated dismissal is prevented because the presentedViewController isModalInPresentation or presentationControllerShouldDismiss: returned NO. When this method is called, it is recommended that the user be informed why they cannot dismiss the presentation, such as by presenting an instance of UIAlertController. API-Since: 13.0
      • presentationControllerDidDismiss

        default void presentationControllerDidDismiss​(@NotNull
                                                      @NotNull UIPresentationController presentationController)
        Called on the delegate when the user has taken action to dismiss the presentation successfully, after all animations are finished. This is not called if the presentation is dismissed programatically. API-Since: 13.0
      • presentationControllerShouldDismiss

        default boolean presentationControllerShouldDismiss​(@NotNull
                                                            @NotNull UIPresentationController presentationController)
        Called on the delegate to determine if the presentation controller may dismiss in response to user action. This method may be called at any time, and may not necessarily be followed by presentationControllerWillDismiss: or presentationControllerDidDismiss:. Any implementation of this method should be fast. Return NO to prevent dismissal of the view controller. API-Since: 13.0
      • presentationControllerWillDismiss

        default void presentationControllerWillDismiss​(@NotNull
                                                       @NotNull UIPresentationController presentationController)
        Called on the delegate when the user has taken action to dismiss the presentation, before interaction or animations begin. Use this callback to setup alongside animations or interaction notifications with the presentingViewController's transitionCoordinator. This is not called if the presentation is dismissed programatically. API-Since: 13.0
      • presentationControllerPrepareAdaptivePresentationController

        default void presentationControllerPrepareAdaptivePresentationController​(@NotNull
                                                                                 @NotNull UIPresentationController presentationController,
                                                                                 @NotNull
                                                                                 @NotNull UIPresentationController adaptivePresentationController)
        Called during adaptation so the delegate may configure properties of the adaptive presentation controller before it is presented. API-Since: 15.0