Skip to content

Instantly share code, notes, and snippets.

@joeblau
Created April 19, 2019 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeblau/25a2ba475532c1044f8c11a2a3fa7c70 to your computer and use it in GitHub Desktop.
Save joeblau/25a2ba475532c1044f8c11a2a3fa7c70 to your computer and use it in GitHub Desktop.

Animated Transition

  • VC asks transitioningDelegate “do you have an animated transition for me?”
  • delegate says “yes here is an <AnimatedTransitioning> object”
  • framework says “hey <AnimatedTransitioning> object; perform the transition, and here’s the <ContextTransitioning> that defines the container view, the from vc, the to vc, the frames, etc. tell the context when you’re done”
  • <AnimatedTransitioning> value does the animation and tells the <ContextTransitioning> value when it’s done
  • fin

Interactive Transition

  • VC asks transitioningDelegate “do you have an interactive transition for me?”
  • delegate says “yes, here is an <InteractiveTransitioning> and an <AnimatedTransitioning>
  • framework says “hey <InteractiveTransitioning>, start the transition, and report your progress to this <ContextTransitioning>
  • the <InteractiveTransitioning> starts tracking interaction and reporting progress to the <ContextTransitioning>
  • the <InteractiveTransitioning> tells the <ContextTransitioning> the interaction is done and the transition should either be aborted or completed
  • the frameworks says “hey <AnimatedTransitioning>, animate the ui to either the initial or final states and tell the <ContextTransitioning> when you’re done
  • the <AnimatedTransitioning> value does the animation and tells the <ContextTransitioning> when it’s done
  • fin

by @davedelong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment