<tfoot id='UDPyN'></tfoot>

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

        <legend id='UDPyN'><style id='UDPyN'><dir id='UDPyN'><q id='UDPyN'></q></dir></style></legend>
        <i id='UDPyN'><tr id='UDPyN'><dt id='UDPyN'><q id='UDPyN'><span id='UDPyN'><b id='UDPyN'><form id='UDPyN'><ins id='UDPyN'></ins><ul id='UDPyN'></ul><sub id='UDPyN'></sub></form><legend id='UDPyN'></legend><bdo id='UDPyN'><pre id='UDPyN'><center id='UDPyN'></center></pre></bdo></b><th id='UDPyN'></th></span></q></dt></tr></i><div id='UDPyN'><tfoot id='UDPyN'></tfoot><dl id='UDPyN'><fieldset id='UDPyN'></fieldset></dl></div>
          <bdo id='UDPyN'></bdo><ul id='UDPyN'></ul>
      1. iPhone dev - 手动旋转视图

        时间:2023-05-18

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

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

              • <tfoot id='rK5l0'></tfoot>
                  <bdo id='rK5l0'></bdo><ul id='rK5l0'></ul>

                  本文介绍了iPhone dev - 手动旋转视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  如何使用 autoresizingMasks 手动旋转视图,就好像用户旋转了手机并且它已经自动旋转了一样.我也希望它是即时的,没有动画.我你想知道我为什么需要这个,看看我的另一个问题 iPhone Dev - 保持界面旋转.

                  How can I manually rotate a view using the autoresizingMasks, as if the user had rotated the phone and it had auto-rotated. Also I want it to be instant, no animation. I you want to know why I need this, look at my other question at iPhone Dev - keeping interface rotation.

                  谢谢!!

                  推荐答案

                  你想要做的是使用仿射变换来旋转你的视图,虽然我现在没有代码在我面前,但我已经做到了.如果你做一个简单的旋转,你会发现你的视图会被切断,而不是像你想要的那样在中心,你需要在这里做的是设置你的图层的锚点(玩弄这个值直到你得到你想要的)为了使视图出现在您想要的位置.解决这个问题的方法是进行 90 度仿射变换旋转并查看它对视图的影响.通过这种方式,您应该能够确定图层锚点需要在哪里.稍后当我在我的 Mac 面前时,我会在这里发布一些示例代码.希望对你有帮助

                  What you want to do here is use Affine transforms to rotate your View, I have accomplished this though i dont have the code infront of me at the moment. If you do a simple rotation youll find that your view will be cut off and not in the center like youd want, what you need to do here is set the anchor of your layer (play around with the value till you get what you want) in order for the view to appear where you want it. The way to approach this is just do the 90 degree affine transform rotation and see the effects it has on the view. This way you should be able to figure out where you layers anchor needs to be. Ill post some sample code here later when I am infront of my mac. Hope it helps

                  这篇关于iPhone dev - 手动旋转视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:横向启动应用程序会导致启动时旋转 下一篇:Android:屏幕旋转、销毁和服务难题

                  相关文章

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

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

                      <bdo id='Wxn7K'></bdo><ul id='Wxn7K'></ul>