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

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

        <tfoot id='wGZ8T'></tfoot>

      2. <legend id='wGZ8T'><style id='wGZ8T'><dir id='wGZ8T'><q id='wGZ8T'></q></dir></style></legend>
        • <bdo id='wGZ8T'></bdo><ul id='wGZ8T'></ul>

        iphone:在导航时强制将方向从纵向更改为横向

        时间:2023-06-11
              <tbody id='Z5zMV'></tbody>
            <tfoot id='Z5zMV'></tfoot>

            • <legend id='Z5zMV'><style id='Z5zMV'><dir id='Z5zMV'><q id='Z5zMV'></q></dir></style></legend>

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

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

                  <i id='Z5zMV'><tr id='Z5zMV'><dt id='Z5zMV'><q id='Z5zMV'><span id='Z5zMV'><b id='Z5zMV'><form id='Z5zMV'><ins id='Z5zMV'></ins><ul id='Z5zMV'></ul><sub id='Z5zMV'></sub></form><legend id='Z5zMV'></legend><bdo id='Z5zMV'><pre id='Z5zMV'><center id='Z5zMV'></center></pre></bdo></b><th id='Z5zMV'></th></span></q></dt></tr></i><div id='Z5zMV'><tfoot id='Z5zMV'></tfoot><dl id='Z5zMV'><fieldset id='Z5zMV'></fieldset></dl></div>
                  本文介绍了iphone:在导航时强制将方向从纵向更改为横向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有什么方法可以在导航时强制将应用方向从纵向更改为横向?

                  Is there any way that we can Forcefully change app orientation from portrait to landscape while navigating ?

                  我有一个要求,在将控制器从 A 推到 B 时.B 应该是横向的,但我的 A 控制器是纵向的.

                  I have a requirement that while pushing controller from A to B. B should be in landscape but my A controller is in portrait.

                  推荐答案

                  在你的 ViewController-B 的 viewDidLoad 中添加这行代码:

                  In your ViewController-B add this lines of code in viewDidLoad:

                    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
                  
                    float   angle = M_PI/2;  //rotate 180°, or 1 π radians
                    self.view.layer.transform = CATransform3DMakeRotation(angle, 0, 0.0, 1.0);
                  

                  如果您使用导航控制器从 A 移动到 B,则此代码可以正常工作.

                  This code is working fine if you are using navigation controller to move from A to B.

                  我用过这个.

                  希望这会对你有所帮助.

                  Hope this will help you.

                  享受编码:)

                  这篇关于iphone:在导航时强制将方向从纵向更改为横向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何像 iOS 7 iPad App Store 一样同时翻转和放大 UIView? 下一篇:导航返回时取消 GCD 异步任务

                  相关文章

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

                • <legend id='GEVW3'><style id='GEVW3'><dir id='GEVW3'><q id='GEVW3'></q></dir></style></legend>

                    1. <small id='GEVW3'></small><noframes id='GEVW3'>

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