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

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

        如何通过触摸该图像来旋转箭头图像?

        How can i rotate an arrow image by touch on that image?(如何通过触摸该图像来旋转箭头图像?)

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

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

          • <legend id='JSAni'><style id='JSAni'><dir id='JSAni'><q id='JSAni'></q></dir></style></legend>
              <bdo id='JSAni'></bdo><ul id='JSAni'></ul>

                  <tbody id='JSAni'></tbody>
              • <tfoot id='JSAni'></tfoot>

                  本文介绍了如何通过触摸该图像来旋转箭头图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在做一个项目,我需要通过触摸来旋转图像.

                  I am working on a project where i need to rotate an image by touching it.

                  根据用户的触摸方式,它可以更快或更慢地旋转.

                  It can be rotate faster or slower depending on how the user touches it.

                  你能告诉我一些教程或如何做到这一点吗?

                  Can you show me some tutorials or how this can be done?

                  推荐答案

                  将你的图像放在 UIImageView 中,然后子类化该视图并替换 touchesBegan:withEvent: 或为其设置一个委托并实现与委托方法相同的方法.这将使您能够响应触摸事件(在这种情况下是触摸的开始,尽管您可以为结束触摸或移动手指做同样的事情).

                  Place your image within a UIImageView, then either subclass that view and replace touchesBegan:withEvent: or set a delegate for it and implement the same method as a delegate method. This will give you the ability to respond to touch events (the beginning of a touch, in this case, although you can do the same for ending a touch or moving of the finger).

                  在这种触摸处理方法中,您可以实现类似于我描述的 这里以便以给定的速度对 UIImageView 执行启用 Core-Animation 的旋转.要更改速度,请更改我提供的动画的持续时间属性.正如我在那里建议的那样,您可能希望研究 CAKeyframeAnimation 以在开始和结束时使用加速和减速来制作更平滑的动画.

                  Within this touch handling method, you can implement something similar to what I describe here in order to perform a Core-Animation-enabled rotation of your UIImageView at a given speed. To alter the speed, change the duration property on the animation I provide. As I suggest there, you may want to look into a CAKeyframeAnimation to do a smoother animation with acceleration and deceleration at the beginning and end.

                  这篇关于如何通过触摸该图像来旋转箭头图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)

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

                  1. <tfoot id='ZbpvT'></tfoot>

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