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

The correct way to create small parallax effect for background image #36

Open gnatok opened 8 years ago

gnatok commented 8 years ago

Hello. Have small question for you, guys. I just have started to use you amazing library. I almost implement all animations that i need but struggling with the main first animation. I need to implement parallax effect(not actually parallax, bg moving with different speed) for background image when i scroll between views. What is the correct animation type to implement that? Thanks

getaaron commented 8 years ago

You could apply translations to the background image view using TranslationAnimation and ScaleAnimation.

If you want it to skew 3D, you could make your own custom animation that adjusts the CATransform3D.