Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios willRotateToInterfaceOrientation未在模式显示的视图控制器中调用_Ios_Objective C_Ios6_Uiinterfaceorientation_Screen Rotation - Fatal编程技术网

Ios willRotateToInterfaceOrientation未在模式显示的视图控制器中调用

Ios willRotateToInterfaceOrientation未在模式显示的视图控制器中调用,ios,objective-c,ios6,uiinterfaceorientation,screen-rotation,Ios,Objective C,Ios6,Uiinterfaceorientation,Screen Rotation,我的整个应用程序都是肖像。当您在集合视图控制器中点击图像时,我会在MWPhotoBrowser视图控制器中以模式显示图像。所以我想支持多个方向。我只支持iOS 6,并且有以下定向方法: - (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAllButUpsideDown; } 这些将被调

我的整个应用程序都是肖像。当您在集合视图控制器中点击图像时,我会在MWPhotoBrowser视图控制器中以模式显示图像。所以我想支持多个方向。我只支持iOS 6,并且有以下定向方法:

- (BOOL)shouldAutorotate {
    return YES;
}


- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAllButUpsideDown;
}
这些将被调用,但不会调用
willRotateToInterfaceOrientation
和后续
WillAnimateRotationInterfaceOrientation
didRotateFromInterfaceOrientation


它不会出现在导航控制器或任何东西中。我不确定我还需要做什么才能使旋转仅在modally presented view controller中得到支持。

重新阅读文档后,我相信我的应用程序必须在应用程序(plist)级别支持横向定向。在这种情况下,我必须更改其他视图控制器中支持的方向,以限制它