<bdo id='WO7kz'></bdo><ul id='WO7kz'></ul>
  • <small id='WO7kz'></small><noframes id='WO7kz'>

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

        <legend id='WO7kz'><style id='WO7kz'><dir id='WO7kz'><q id='WO7kz'></q></dir></style></legend>
      1. <tfoot id='WO7kz'></tfoot>

        如何在两个 PNG 图像之间为 UIButton 设置动画?

        时间:2023-07-07
        <i id='Z7lPu'><tr id='Z7lPu'><dt id='Z7lPu'><q id='Z7lPu'><span id='Z7lPu'><b id='Z7lPu'><form id='Z7lPu'><ins id='Z7lPu'></ins><ul id='Z7lPu'></ul><sub id='Z7lPu'></sub></form><legend id='Z7lPu'></legend><bdo id='Z7lPu'><pre id='Z7lPu'><center id='Z7lPu'></center></pre></bdo></b><th id='Z7lPu'></th></span></q></dt></tr></i><div id='Z7lPu'><tfoot id='Z7lPu'></tfoot><dl id='Z7lPu'><fieldset id='Z7lPu'></fieldset></dl></div>
          <bdo id='Z7lPu'></bdo><ul id='Z7lPu'></ul>

                <tbody id='Z7lPu'></tbody>
              • <small id='Z7lPu'></small><noframes id='Z7lPu'>

                <tfoot id='Z7lPu'></tfoot>

                  <legend id='Z7lPu'><style id='Z7lPu'><dir id='Z7lPu'><q id='Z7lPu'></q></dir></style></legend>

                1. 本文介绍了如何在两个 PNG 图像之间为 UIButton 设置动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有两个要用作按钮的 PNG.如何通过在这两个图像之间快速切换来为 UIButton 设置动画?

                  I have two PNGs I want to use as a button. How can I animate a UIButton by switching rapidly between these two images?

                  推荐答案

                  您可以使用按钮 imageViewanimationImages 属性:

                  You can use animationImages property of your button's imageView:

                  myButton.imageView.animationImages =
                  [NSArray arrayWithObjects:[UIImage imageNamed:@"image1.png"],
                                            [UIImage imageNamed:@"image2.png"],
                                            nil];
                  myButton.imageView.animationDuration = 0.5; //whatever you want (in seconds)
                  [myButton.imageView startAnimating];
                  

                  您的按钮将在您的两个图像之间切换.

                  Your button will switch between your two images.

                  正如@tidbeck 指出的那样,按钮需要分配一个图像才能创建 imageview 属性.

                  As @tidbeck pointed the button needs to have an image assigned to create the imageview property.

                  这篇关于如何在两个 PNG 图像之间为 UIButton 设置动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:目标 C:从 UIButton 类的子类创建的按钮不起作用 下一篇:自定义 UITableView 中的删除按钮

                  相关文章

                  <small id='8wKBl'></small><noframes id='8wKBl'>

                  <legend id='8wKBl'><style id='8wKBl'><dir id='8wKBl'><q id='8wKBl'></q></dir></style></legend>

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

                      <bdo id='8wKBl'></bdo><ul id='8wKBl'></ul>