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

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

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

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

      横向启动应用程序会导致启动时旋转

      时间:2023-05-18

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

        <tbody id='2nSWk'></tbody>
          <bdo id='2nSWk'></bdo><ul id='2nSWk'></ul>

                <legend id='2nSWk'><style id='2nSWk'><dir id='2nSWk'><q id='2nSWk'></q></dir></style></legend>

                <small id='2nSWk'></small><noframes id='2nSWk'>

                本文介绍了横向启动应用程序会导致启动时旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我已经实现了 shouldAutorotateToInterfaceOrientation 并且在我的应用程序运行后一切正常或方向变化.但是,我不喜欢我的应用程序首次启动时的行为.

                I have implemented shouldAutorotateToInterfaceOrientation and everything works fine in terms or orientation changes in my app once it is running. However I don't like the behavior of my app when it is fist launched.

                当我以纵向方向启动我的应用程序时,它会按预期打开,但是当我以横向方向启动我的应用程序时,我看到所有内容都以纵向方向加载(包括状态栏),然后我看到屏幕旋转的动画到景观.该动画很好,但我不希望它在启动时显示.

                When I launch my app in portrait orientation, it opens as expected, however when I launch my app in landscape orientation, I see everything load in portrait orientation (including the status bar), then I see an animation of my screen rotating to landscape. That animation is fine, but I don't want it to be displayed at launch.

                当我查看大多数其他应用时,它们似乎在启动时检测到方向,并且在启动时不显示旋转动画(仅当设备在启动时间后旋转时).

                When I look at most other apps, they seem to detect the orientation as they launch and they do not show the rotation animation on launch (only if the device is rotated after launch time).

                如何确保我的应用以正确的方向加载,以便用户在启动时看不到旋转动画.如果用户在启动后旋转设备时只看到旋转动画,我会更喜欢它.

                How can I make sure my app loads in the proper orientation so the user does not see the rotation animation on launch. I would prefer it if the user only saw the rotation animation if he/she rotates the device after launching.

                推荐答案

                好吧,我想我想通了.对于从 iPhone 模板创建应用程序然后为 iPad 修改它的任何人,您需要在 -info.plist 文件中添加一行显示支持的界面方向"并输入所有支持的方向,如下所示.然后它似乎按预期工作.

                Okay I think I figured it out. For anybody who created an app from an iPhone tempalte and then modified it for iPad, you need to add a line in your -info.plist file that says "Supported interface orientations" and enter all of the supported orientations as below. Then it seems to work as expected.

                    <key>UISupportedInterfaceOrientations</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                    <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                </array>
                

                这篇关于横向启动应用程序会导致启动时旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:UINavigationBar 旋转和自动布局 下一篇:iPhone dev - 手动旋转视图

                相关文章

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

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

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

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