来自自定义模式表示的视图控制器在iOS7中未自动旋转-(BOOL)不应正确调用自动旋转

来自自定义模式表示的视图控制器在iOS7中未自动旋转-(BOOL)不应正确调用自动旋转,ios7,uiinterfaceorientation,autorotate,presentviewcontroller,custom-transition,Ios7,Uiinterfaceorientation,Autorotate,Presentviewcontroller,Custom Transition,我有一个视图控制器,我用一个自定义的模态表示来表示它 myViewController.modalPresentationStyle = UIModalPresentationCustom; myViewController.transitioningDelegate = self; [self presentViewController:myViewController animated:YES completion:nil]; 按预期工作,但由于某些原因(在iOS7中),当设备方向更改时

我有一个视图控制器,我用一个自定义的模态表示来表示它

myViewController.modalPresentationStyle = UIModalPresentationCustom;
myViewController.transitioningDelegate = self;

[self presentViewController:myViewController animated:YES completion:nil];
按预期工作,但由于某些原因(在iOS7中),当设备方向更改时,显示的视图控制器未自动旋转。显然,(显示的视图控制器)方法:

当设备方向更改时,在iOS7中未调用。第一次显示时只调用一次。当我在iOS8上运行它时,它工作正常,应该正确调用autorotate。这很奇怪,因为它只能以肖像的形式呈现。如果我试图在风景中呈现风景,那是行不通的。我已经检查了所有的父视图控制器,它们都设置正确,并且在plist和app delegate方法中设置了所有方向。有谁知道为什么这在iOS8中有效而在iOS7中无效

- (BOOL)shouldAutorotate {
        return YES;
}