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

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

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

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

        选项卡栏控制器内的视图控制器不会在旋转时自动调整大小

        View controllers inside tab bar controller not auto-resizing on rotation(选项卡栏控制器内的视图控制器不会在旋转时自动调整大小)

          <tbody id='hWMzb'></tbody>

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

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

                  <legend id='hWMzb'><style id='hWMzb'><dir id='hWMzb'><q id='hWMzb'></q></dir></style></legend>
                  本文介绍了选项卡栏控制器内的视图控制器不会在旋转时自动调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  (更正:视图控制器不会自动调整大小而不是自动旋转.)

                  (Correction: the view controllers are not auto-resizing instead of not auto-rotating.)

                  在一个 iPad 应用程序中,我在一个标签栏控制器中有五个常规视图控制器(不是导航控制器或类似的东西).标签栏控制器只是在应用程序委托中声明的普通 UITabBarController.

                  In an iPad app, I have five regular view controllers (not navigation controllers or anything like that) inside a tab bar controller. The tab bar controller is just a plain UITabBarController declared in the app delegate.

                  所有视图控制器在 shouldAutorotateToInterfaceOrientation 方法中返回 YES.

                  All the view controllers return YES in the shouldAutorotateToInterfaceOrientation method.

                  在模拟器和设备上,旋转时,标签栏和当前视图控制器旋转,但当前选择的视图控制器(称为 A)没有正确调整大小.它保持它的纵向宽度和高度(但它是旋转的).

                  On both the simulator and device, on rotation, the tab bar and the current view controller rotate but the currently selected view controller (call it A) does not resize properly. It keeps its portrait width and height (but it is rotated).

                  如果我切换到另一个视图控制器 B,然后又回到 A(不再次旋转设备),A 的大小会正确调整.

                  If I switch to another view controller B and then back to A (without rotating the device again), A appears correctly resized.

                  这发生在五个视图控制器中的任何一个上

                  This happens with any of the five view controllers

                  为什么当前选择的视图控制器在旋转时不立即调整大小,我该如何解决?

                  Why doesn't the currently selected view controller resize immediately on rotation and how do I fix it?

                  谢谢.

                  推荐答案

                  你应该添加:

                  self.view.autoresizesSubviews = YES;
                  self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
                  

                  到标签栏控制器的子视图控制器的每个 viewDidLoad 方法.

                  To each viewDidLoad method of the sub-viewcontrollers of your tabbar controller.

                  这篇关于选项卡栏控制器内的视图控制器不会在旋转时自动调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  UIImageView Gestures (Zoom, Rotate) Question(UIImageView 手势(缩放、旋转)问题)
                  Responsive website on iPhone - unwanted white space on rotate from landscape to portrait(iPhone上的响应式网站-从横向旋转到纵向时不需要的空白)
                  How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
                  How to capture current view screenshot and reuse in code? (iPhone SDK)(如何捕获当前视图屏幕截图并在代码中重用?(iPhone SDK))
                  iOS 6 shouldAutorotate: is NOT being called(iOS 6 shouldAutorotate: 没有被调用)
                  What is the PastryKit Framework?(PastryKit 框架是什么?)

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

                          <tfoot id='jtMlC'></tfoot>

                            <tbody id='jtMlC'></tbody>

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

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