Ios shouldAutorotate返回YES,但不进行旋转

Ios shouldAutorotate返回YES,但不进行旋转,ios,xcode,uiviewcontroller,Ios,Xcode,Uiviewcontroller,我正在尝试使视图控制器旋转,但无法使其工作。我添加了以下两种方法: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return YES; //iOS 5 } - (BOOL)shouldAutorotate { return YES; //iOS 6 } 第二个(im使用ios6)确实被调用,但没有发生旋转。为什么会这样 谢谢! 在

我正在尝试使视图控制器旋转,但无法使其工作。我添加了以下两种方法:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return YES; //iOS 5
}

- (BOOL)shouldAutorotate
{
    return YES; //iOS 6
}
第二个(im使用ios6)确实被调用,但没有发生旋转。为什么会这样


谢谢!

在ios6上也实现这一点:

- (NSUInteger) supportedInterfaceOrientations
{
   return UIInterfaceOrientationMaskAll; 
}
这篇文章对我支持ios5和ios6非常有用:

是的,我也有这个。。。我将阅读那个链接,看看它是否能把我带到任何地方。iOS6默认值可以旋转。删除shouldAutorotate