material-motion / material-motion-swift

A toolkit for building responsive motion using Core Animation.
Apache License 2.0
1.42k stars 79 forks source link

Explore composition of transitions #90

Open jverkoey opened 7 years ago

jverkoey commented 7 years ago

Context: we have a collection of simple transitions and we'd like to compose them together to create complex transitions.

Example: a "push back" transition composed of a slide + scale transition.

One option:

// Turn this API:
vc.transitionController.transitionType = SlideTransition.self

// Into this API:
vc.transitionController.transitionTypes = [SlideTransition.self, ScaleTransition.self]