AdvanceiOS動(dòng)畫引擎
Advance 是一個(gè)純 Swift 編寫的框架,可為開發(fā)者提供強(qiáng)大的動(dòng)畫功能。只要一個(gè)簡單API,就能實(shí)現(xiàn)復(fù)雜的動(dòng)畫效果。
示例代碼:
import Advance
class MyClass {
let center: Animatable<CGPoint>
init() {
...
center.changed.observe { (value) in
// Do something every time the center value changes
}
}
}
let foo = MyClass()
// foo.center.animateTo(...)
// foo.center.springTo(...)
// foo.center.decay(...)
// foo.center.animate(<custom animation type>)
評(píng)論
圖片
表情
