我正在使用这段代码来制作动画。我的问题是如何停止动画?也不要告诉我更改重复次数。我想让动画一直工作到我说停止为止。有没有什么方法可以让我做到这一点?
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationRepeatCount:INFINITY];
[[menuViewOne loadBut] setFrame:CGRectMake(230, 35, 150, 25)];
[UIView commitAnimations];发布于 2011-05-02 07:23:28
您可以使用块的开始停止动画。文档不推荐使用commitAnimations。
从文件里。
在iOS 4.0及更高版本中,不鼓励
使用此方法。您应该使用基于块的动画方法来指定您的动画。
https://stackoverflow.com/questions/5852136
复制相似问题