IFTTT / RazzleDazzle

A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros.
http://ifttt.github.io
MIT License
3.36k stars 291 forks source link

Can an alternative alternatives set of animations be driven by a Pinch Gesture? #5

Closed fatuhoku closed 9 years ago

fatuhoku commented 9 years ago

I know that RazzleDazzle basically works with logical time and therefore is inherently linear. This, when tied to the scroll gesture / contentOffset makes for a natural linear animated interaction.

However, as well as scrolling, I'm interested in letting the user 'zoom out' from that animated interaction so that they see, in effect, a 20,000ft view of the content they were just looking at. i.e. we want to tie animations to a change in zoomLevel as well.

I just want to confirm, that it's possible to attach, say, TWO (or any number for that matter!) of animators to a View's various different properties?

e.g.

x-scroll animates alpha — fades between 0 and 1 y-scroll animates size — scales object frame between 0 and 1

lauraskelton commented 9 years ago

Yes, that should work perfectly! Just make sure you have one animator that animates based on the x-scroll, and a second animator that animates based on the y-scroll. And, use animations that won't conflict with each other, the same way you would if they were all controlled by a single animator (eg., only one scale animation per view).

lauraskelton commented 9 years ago

I'd love to see how this turns out!