沿x轴来回移动UIAnimation

时间:2012-10-20 23:00:50

标签: ios

我可以让UIImage稍微移动到x轴向右移动到原始位置。

 -(void) uiview_anim
 {

[UIView beginAnimations:@"Move" context:nil];
[UIView setAnimationDuration:3];
[UIView setAnimationBeginsFromCurrentState:YES];
CGPoint a;

     a.x=finger.frame.origin.x;


a.x=a.x+10;              

finger.center=a;


[UIView commitAnimations];  
}

它也会移动Y方向,但我没有指明。我需要它一旦移动就快速回到原来的位置。 Finger是我正在研究的UIImageView。

0 个答案:

没有答案