0
当我beginAnimation-commitAnimatin块,我得到一个弹跳效果之内写我的动画代码,但是我不,当我做同样的动画获得同样的效果用写在主题中的方法。这里有两种方法可以做我想做的:与animateWithDuration无弹跳效果:延迟:选项:动画:完成:方法
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelay:0.5];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationRepeatCount:2];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:
@selector(resetTheChickenProperties)];
theChicken.frame = CGRectMake(15, 330, 62, 90);
[UIView commitAnimations];
图像(这是一个鸡蛋),上面显示的方式去y方向,直到它击中地面和反弹。弹跳效果清晰可见。但是,如果我做同样的事情与animateWithDuration的帮助:延迟:选项:动画:compeletion方法鸡蛋不反弹。它好像挂在春天。