Spring Meng To the animation chain?

I do not fully understand the documentation for Meng To Spring.

https://github.com/MengTo/Spring

Available available features are

animate()
animateNext { ... }
animateTo()
animateToNext { ... }

and the given example for the chain:

layer.y = -50
animateToNext {
  layer.animation = "fall"
  layer.animateTo()
}

I do not see anywhere where these functions are actually performed. Maybe this is super straight forward, and I just missed it.

If I wanted to combine 3 animations, let's just say that layer.animation = "fall" with this, what would it look like and the difference between animateNext, animateTo and animateToNext?

+4
source share
1 answer

You are right that these functions will not be documented, so I came across the same questions when I wanted to implement animation with this library.

3 , :

    view.animation = "pop"
    view.duration = 3
    view.delay = 2
    print("1")
    view.animateToNext {
        self.view.animation = "pop"
        self.view.duration = 3
        self.view.delay = 2
        print("2")
        self.view.animateToNext {
            self.view.animation = "pop"
            self.view.duration = 3
            self.view.delay = 2
            self.view.animate()
            print("3")
        }
    }

, animateNext , , animateToNext.

, .

+1

Source: https://habr.com/ru/post/1668914/


All Articles