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