求动画结束后的方法或者代理

animatedImageView.animationImages = [NSArray arrayWithObjects:

,

,

,

, nil];

animatedImageView.animationDuration = 1.0f;

animatedImageView.animationRepeatCount = 0;

;

我如何在上面代码的情况下执行动画结束后的方法。如动画结束,我要执行animatedImageView setHidden :yes]等等。将这些写在哪里呢?

这个跟程序有关,如果只是简单lian?xu动画,用^block看看行不行

我想 既然有startAnimating 就应该有对应的end方法把 你commmand进去看看 commmand+f 找下end

+ (void)setAnimationDidStopSelector:(SEL)selector;

写在这个selector里,专门写个方法,调用它

看你的代码 animatedImageView.animationRepeatCount = 0;

说明是无限循环吧 何来的动画结束呢

如果把这个值改过成其他数值以后 可以用 self performSelector:<#(SEL)#> withObject:<#(id)#> afterDelay:<#(NSTimeInterval)#>]; afterDelay的参数可以用 animDuration * repeatCount。

现在ios 推荐使用 的方法实现动画了,如果动画结束后你有想实现的代码。那么你可以用下面的方法实现动画completion(BOOL finished){ 在这里面写动画结束的方法}];