【发布时间】:2013-10-27 05:28:47
【问题描述】:
我曾经以UIModalPresentationCurrentContext 的演示风格呈现来自另一个UIViewController 的UIViewController。但它不允许我旋转presentingviewcontroller(呈现新UIViewController 的UIViewController)
self.modalPresentationStyle = UIModalPresentationCurrentContext;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];
当我旋转设备时,它会旋转newViewController 和statusbar,但不会旋转presentingViewController
PS:这里presentingViewController 是self。
【问题讨论】:
-
正在呈现任何其他控制器的 ViewController 子级吗?也许你忘了把它作为一个孩子添加,它没有得到任何事件。
-
不,它是 rootViewController。
-
在其他演示样式中它可以正常工作,但在
UIModalPresentationCurrentContext中则不行。 -
我也面临同样的问题......你有答案吗?
标签: iphone ios objective-c ipad uiviewcontroller