3
我已經設法讓我的UIView動畫時,將其frame.origin.x從x移動到x-200;但是,當frame.origin.x達到x-200時,我希望它稍微反覆一些。UIView框架原點x動畫彈跳效果
任何關於如何去做這件事的任何提示? 謝謝
int targetX = 200;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.1];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
myView.frame = CGRectMake(targetX, 0, [myView frame].size.width, [myView frame].size.height);
[UIView commitAnimations];
是的,'CAKeyframeAnimation`是要走的路。 – Costique 2011-02-06 14:01:41