1. <i id='x8yyD'><tr id='x8yyD'><dt id='x8yyD'><q id='x8yyD'><span id='x8yyD'><b id='x8yyD'><form id='x8yyD'><ins id='x8yyD'></ins><ul id='x8yyD'></ul><sub id='x8yyD'></sub></form><legend id='x8yyD'></legend><bdo id='x8yyD'><pre id='x8yyD'><center id='x8yyD'></center></pre></bdo></b><th id='x8yyD'></th></span></q></dt></tr></i><div id='x8yyD'><tfoot id='x8yyD'></tfoot><dl id='x8yyD'><fieldset id='x8yyD'></fieldset></dl></div>

    <small id='x8yyD'></small><noframes id='x8yyD'>

    1. <legend id='x8yyD'><style id='x8yyD'><dir id='x8yyD'><q id='x8yyD'></q></dir></style></legend>
        <bdo id='x8yyD'></bdo><ul id='x8yyD'></ul>

    2. <tfoot id='x8yyD'></tfoot>
    3. 如何暂停 UIImageView 动画

      时间:2024-04-14

      <tfoot id='rSRQG'></tfoot>
      1. <small id='rSRQG'></small><noframes id='rSRQG'>

          <i id='rSRQG'><tr id='rSRQG'><dt id='rSRQG'><q id='rSRQG'><span id='rSRQG'><b id='rSRQG'><form id='rSRQG'><ins id='rSRQG'></ins><ul id='rSRQG'></ul><sub id='rSRQG'></sub></form><legend id='rSRQG'></legend><bdo id='rSRQG'><pre id='rSRQG'><center id='rSRQG'></center></pre></bdo></b><th id='rSRQG'></th></span></q></dt></tr></i><div id='rSRQG'><tfoot id='rSRQG'></tfoot><dl id='rSRQG'><fieldset id='rSRQG'></fieldset></dl></div>
              <tbody id='rSRQG'></tbody>
            • <bdo id='rSRQG'></bdo><ul id='rSRQG'></ul>
                <legend id='rSRQG'><style id='rSRQG'><dir id='rSRQG'><q id='rSRQG'></q></dir></style></legend>
              • 本文介绍了如何暂停 UIImageView 动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个正在使用 UIImageView 显示的动画:

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

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

                我知道我可以使用 stopAnimating 来停止它,但我想要的是能够暂停它.原因是当您调用停止时,您的动画图像都不会显示,而我希望在我按下按钮时显示的最后一个动画图像保持不变.

                I know I can stop it using stopAnimating, but what I want is to be able to pause it. The reason is that when you call stop, none of your animation images are displayed, whereas I would like the last one that is up at the time when I hit a button to stay up.

                我尝试将持续时间设置为更大的数字,但这也会导致所有图像消失.必须有一个非常基本的方法来做到这一点?

                I have tried setting the duration to a much larger number, but that causes all the images to disappear as well. There must be a really basic way to do this?

                推荐答案

                嗯...因为似乎没有人知道我猜这是不可能的.

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

                我继续编写了自己的 UIView,带有 UIImageView subview,它使用 NSTimer在图像之间切换.这样做的好处是我可以在闲暇时暂停和恢复计时器,而且性能似乎不是问题.

                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.

                这篇关于如何暂停 UIImageView 动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 Storyboard 中实现视频视图 下一篇:Swift UIImageView 拉伸方面

                相关文章

                • <bdo id='vL5nv'></bdo><ul id='vL5nv'></ul>

                <tfoot id='vL5nv'></tfoot>

                <small id='vL5nv'></small><noframes id='vL5nv'>

              • <legend id='vL5nv'><style id='vL5nv'><dir id='vL5nv'><q id='vL5nv'></q></dir></style></legend>
                  1. <i id='vL5nv'><tr id='vL5nv'><dt id='vL5nv'><q id='vL5nv'><span id='vL5nv'><b id='vL5nv'><form id='vL5nv'><ins id='vL5nv'></ins><ul id='vL5nv'></ul><sub id='vL5nv'></sub></form><legend id='vL5nv'></legend><bdo id='vL5nv'><pre id='vL5nv'><center id='vL5nv'></center></pre></bdo></b><th id='vL5nv'></th></span></q></dt></tr></i><div id='vL5nv'><tfoot id='vL5nv'></tfoot><dl id='vL5nv'><fieldset id='vL5nv'></fieldset></dl></div>