1
我對動畫非常新穎,我需要一個CABasicAnimation,該圖像如何實現將圖像從左下角移動到右上角。我嘗試了不同的例子,但我沒有成功。阿洛斯我沒有使用接口生成器我正在使用視圖控制器來實現這一點。請幫幫我。如何使用CABasicAnimations
在此先感謝, Sekhar。
我對動畫非常新穎,我需要一個CABasicAnimation,該圖像如何實現將圖像從左下角移動到右上角。我嘗試了不同的例子,但我沒有成功。阿洛斯我沒有使用接口生成器我正在使用視圖控制器來實現這一點。請幫幫我。如何使用CABasicAnimations
在此先感謝, Sekhar。
應該是這樣的:
CABasicAnimation* anim = [CABasicAnimation animation];
anim.fromValue = [NSValue valueWithCGPoint:CGPointMake(0,460)]; //Start position
anim.toValue = [NSValue valueWithCGPoint:CGPointMake(320,0)]; //End Position
anim.duration = 1.0;
[vourImageView.layer addAnimation:anim forKey:@"MoveToUpperRight"];
編碼瀏覽器,語法不能保證。
請參閱Core Animation Programming Guide章節明確的動畫
感謝您的回答。 – 2010-07-29 10:36:08