我正在尝试使用UIModalPresentationCurrentContext在一个VC上显示另一个VC,以便看到它后面的视图。以下代码可行:
UIViewController *transparentViewController = [[UIViewController alloc] init];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:transparentViewController animated:NO completion:^{
}];
然而,当我推送VC后旋转设备时,旋转看起来完全混乱。它不是干净地旋转,而是尴尬地拉伸视图以适应新方向。
此外,当我子类化transparentViewController时,我发现它的viewwillautorotate方法没有被调用!(即使它以其混乱的动画方式旋转)
UIModalPresentationCurrentContext样式是否不能旋转?有没有办法解决这个问题?还有其他人遇到过这个问题吗?