<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:在导航时强制将方向从纵向更改为横向

        iphone: Forcefully change orientation from portrait to landscape on navigation(iphone:在导航时强制将方向从纵向更改为横向)
              <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:在导航时强制将方向从纵向更改为横向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                  ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                  Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                  How to get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  Show UITabBar when UIViewController pushed(推送 UIViewController 时显示 UITabBar)
                  <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>

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

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