PercentDrivenInteractionController

public protocol PercentDrivenInteractionController : UIViewControllerInteractiveTransitioning

PercentDrivenInteractionController is used for interaction controller types that can updated based on a percentage of completion. Furthermore, a PercentDrivenInteractionController should be able to cancel and finish a transition animation.

PercentDrivenInteractionController is based on the UIViewControllerInteractiveTransitioning protocol.

Note

While you can implement your custom implementation, UIKit offers a default implementation with UIPercentDrivenInteractiveTransition.
  • Updates the animation to be at the specified progress.

    This method is called based on user interactions. A linear progression of the animation is encouraged when handling user interactions.

    Declaration

    Swift

    func update(_ percentComplete: CGFloat)
  • Cancels the animation, e.g. by cleaning up and reversing any progress made.

    Declaration

    Swift

    func cancel()
  • Finishes the animation by completing it from the current progress onwards.

    Declaration

    Swift

    func finish()