2011-06-08 86 views
1

我對iphone中的動畫非常新穎。首先,我想實施地球或地球的旋轉。我怎麼能實現它在iphone 在此先感謝動畫在iphone中使用目標c

+0

可以添加你想要什麼,更詳細旋轉,地球是好的,但它會是一個2D圖像,或者它應該與OpenGL 3D? – 2011-06-08 09:55:11

+0

@ Nick Weaver:2D圖像會很好 – sujay 2011-06-08 10:00:01

回答

0

對於二維動畫,你需要一些幀(理想情況下360),然後通過在UIImageView中的幀。您可以通過設置animationImages屬性此example

0

你可以使用這個......這個不旋轉,而是從一個位置移動圖像到另一個


CGRect tempFrame=theView.frame; 

tempFrame.origin.x=tempFrame.origin.x+50; 

[UIView beginAnimations:@"" context:nil]; 

[UIView setAnimationDuration:2]; 

theView.frame=tempFrame; 

[UIView commitAnimations];