UIView
提供了一些寬鬆的選項(UIViewAnimationOptionCurveEaseIn
,UIViewAnimationOptionCurveEaseOut
,UIViewAnimationOptionCurveEaseInOut
)爲其動畫的方式,但我想在寬鬆更多的控制。有沒有辦法使用的UIView自定義公式輕鬆動畫
有沒有辦法給它提供一個自定義方程,或者以任何方式獲得更多的控制權?也就是說,除了使用touchesBegan:
等來推出我自己的動畫。
UIView
提供了一些寬鬆的選項(UIViewAnimationOptionCurveEaseIn
,UIViewAnimationOptionCurveEaseOut
,UIViewAnimationOptionCurveEaseInOut
)爲其動畫的方式,但我想在寬鬆更多的控制。有沒有辦法使用的UIView自定義公式輕鬆動畫
有沒有辦法給它提供一個自定義方程,或者以任何方式獲得更多的控制權?也就是說,除了使用touchesBegan:
等來推出我自己的動畫。
我想你需要爲此使用核心動畫。
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html
使用CAKeyframeAnimation(http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAKeyframeAnimation_class/Introduction/Introduction.html#//apple_ref/occ/cl/CAKeyframeAnimation),您可以自定義animaiton的時機