ios5.1 动画设置

[UIView beginAnimations:nil context:spot];  //开始定义动画块

[UIView setAnimationDelegate:self];       //将控制模块设置为委托

[UIView setAnimationDidStopSelector:@selector(finishedAnimation:finished:context:)];  //动画结束时,调用委托指定的方法

[UIView setAnimationDuration:drawTime];  //设置动画时长

[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];    //设置动画缓慢启动,然后逐渐加速

[spot setFrame:CGRectMake(x + BALL_RADIUS, y + BALL_RADIUS, 0, 0)]; //设置动画结束时,小球的位置

[UIView commitAnimations];    //动画定义结束

ios开发中动画的启动和设置过成基本上就是这几步!