我曾经使用演示风格UIViewController
来呈现来自另一个UIViewController
的{{1}}。但它不允许我轮换UIModalPresentationCurrentContext
(提出新presentingviewcontroller
的{{1}})
UIViewController
当我旋转设备时,它会旋转UIViewController
和self.modalPresentationStyle = UIModalPresentationCurrentContext;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];
但不会newViewController
PS:此处statusbar
为presentingViewController
。
答案 0 :(得分:0)
使用UIModalPresentationFormSheet
代替UIModalPresentationCurrentContext
试试这个
self.modalPresentationStyle = UIModelPresentationFormSheet;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];