In this video tutorial you'll learn how to group animations together with CAAnimationGroup.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3270-intermediate-ios-animation/lessons/5
In this video tutorial you'll learn how to group animations together with CAAnimationGroup.
hey Marin,
So today I was looking over at this table of key paths from Apple and so I decided I’d try to animate a shadow disappearing…
let shadow = CABasicAnimation(keyPath: "shadowOpacity")
shadow.fromValue = 1.0
shadow.toValue = 0.0
Nothing happened… then I tried putting this line of code into the didLayoutSubviews function:
loginButton.layer.shadowOpacity = 1.0
still nothing.
Was I looking in the right place for a list of the key paths? I noticed that in some cases you have something like “transform.scale” while in others you have “opacity”… how do I know not to put just “scale” there?
I really like the #selector idea for swift 2.2 and wish there’d be something exposed to the compiler like that here too… actually is there a way to have autocomplete for key paths? (hm i guess i could type loginButton. and see what comes…
hey - check out the spring animations video, there’s an example for animating a layer’s shadow in there (I think it was in the challenges)
great suggestions! off i go