suguru / Cheetah

Easy animation library on iOS with Swift2
MIT License
590 stars 47 forks source link

How to group animations? #13

Open hernangonzalez opened 7 years ago

hernangonzalez commented 7 years ago

Hello Guys,

I would like to setup animations for different views, and trigger them combined at different times.

I.e:

let anim1 = view1.cheetah.scale(0)
let anim2 = view2.cheetah.alpha(0)
let anim3 = view3.cheetah.move(10,10)

// then do
[anim1, anim2].run()
// or
[anim3, anim1].run()

Is there a way to accomplish that? Ideally I would also like to have a single completion blocked called when all of them are done (which may have different durations).

Thanks, H.