【问题标题】:iPad orientation problemiPad方向问题
【发布时间】:2011-10-24 01:44:41
【问题描述】:

在应用程序中,我只想支持 UIInterfaceOrientationLandscapeRight。所以我为此做了两件事。 1)在proj plist文件中将初始界面方向设置为UIInterfaceOrientationLandscapeRight。 2)在每个视图控制器中编写此代码。 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return(interfaceOrientation==UIInterfaceOrientationLandscapeRight); }

但是当我使用 removeFromSuperview 和 addSubview 方法切换到另一个视图以用新视图替换旧视图时,新视图的方向不正确。

      How to solve this problem ???

【问题讨论】:

    标签: iphone ipad ios4


    【解决方案1】:

    转到您项目的 info.plist(此文件将在 Resources 文件夹中)并添加这两个字段

    你只需要在左边添加键,可能的值就会出现在右边

    【讨论】:

      猜你喜欢
      • 2013-03-14
      • 1970-01-01
      • 1970-01-01
      • 2014-07-13
      • 1970-01-01
      • 2011-03-13
      相关资源
      最近更新 更多