【问题标题】:rotation issue in ios 6ios 6 中的轮换问题
【发布时间】:2013-02-12 20:08:27
【问题描述】:

我到处寻找,但在 iOS 6 中我找不到解决这个烦人的旋转问题的方法。

由于某种原因,我无法在 iOS 6 中使用旋转方法。他们甚至没有被调用。

例如:

如果我想在 iOS 5 中以纵向模式保持视图,我使用:

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

我了解到iOS 6中的新方法应该是:

- (NSUInteger)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}

我也尝试添加:

-(BOOL)shouldAutorotate
{
    return NO;
}

但它根本不起作用。

请帮忙!

【问题讨论】:

    标签: ios5 ios6 rotation orientation


    【解决方案1】:

    如果你有这一切,它应该像在 Info.plist 以及你的控制器中设置支持的方向一样简单。您可以通过项目目标上的“摘要”选项卡执行此操作。

    【讨论】:

      猜你喜欢
      • 2013-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-16
      • 2012-12-07
      相关资源
      最近更新 更多