AnimationBehavior

public enum AnimationBehavior
extension AnimationBehavior: Equatable

A value that represents the behavior to use when animating the appearnce or dismissal of a presented view controller.

  • Use the default system animation.

    Declaration

    Swift

    case system
  • Animate appearing and dismissing using specific edges of the screen.

    Declaration

    Swift

    case present(
        edgeForAppearance: ViewEdgeConvertible,
        edgeForDismissal: ViewEdgeConvertible
    )
  • Animate using custom animators for appearance and dismissal.

    Declaration

    Swift

    case custom(appearance: UIViewControllerAnimatedTransitioning,
                dismissal: UIViewControllerAnimatedTransitioning)
  • An animation behavior that uses a custom animator object for both appearance and dismissal.

    Declaration

    Swift

    static func custom(
        _ animator: UIViewControllerAnimatedTransitioning
    ) -> AnimationBehavior

    Parameters

    animator

    The custom animator to use.

    Return Value

    An AnimationBehavior with both appearance and dismissal set to animator.

  • Declaration

    Swift

    public static func == (lhs: AnimationBehavior,
                           rhs: AnimationBehavior) -> Bool