【问题标题】:How to fix a viewcontroller's rotation?如何修复视图控制器的旋转?
【发布时间】:2013-02-14 09:04:46
【问题描述】:

我的应用仅使用横向。我通过 .plist 支持的界面方向修复了它。

但是,我需要使用 UIImagePickerController,它只支持纵向模式。如何在特定的视图控制器中将我的应用旋转为纵向?

任何提示都会非常有帮助!太棒了!

【问题讨论】:

    标签: objective-c uiviewcontroller rotation uiimagepickercontroller


    【解决方案1】:

    ColinE,你的意思是我应该设置如下?

    所有其他视图控制器

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
    { 
        return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || UIInterfaceOrientationLandscapeLeft); 
    }
    

    并设置portarit页面

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
    { 
        return (interfaceOrientation == UIInterfaceOrientationPortrait); 
    }
    

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多