How to pause a UIImageView animation

前端 未结 6 1745
有刺的猬
有刺的猬 2021-02-06 17:03

I have an animation that I\'m displaying using a UIImageView:

imageView.animationImages = myImages;
imageView.animationDuration = 3;
[imageView startAnimating];
         


        
6条回答
  •  面向向阳花
    2021-02-06 17:53

    Hmmm...since no one seems to know I guess it's not possible.

    I went ahead and wrote my own UIView, with a UIImageView subview, that uses an NSTimer to switch between images. The advantage of this is that I can pause and resume the timer at my leisure, and performance doesn't seem to be an issue.

提交回复
热议问题