2010-03-01 139 views
2

是否可以通過在iphone SDK中按下按鈕將圖像設置爲沿預定路徑運動?我沒有尋找任何幻想。我正在研究一個簡單的概念,但這會節省很多動畫工作。沿預定路徑移動圖像?

+0

另請參閱此問題:http://stackoverflow.com/questions/1142727/how-can-i-animate-the-movement-of-a-view-or-image-along-a-curved-path – 2010-03-03 19:28:30

回答

3

是的。您可以通過創建CAKeyframeAnimation並將CGPath分配給path屬性來沿路徑設置任何CALayer的動畫。以this blog post by Bill Dudney爲例。