Raf*_*eek 8 iphone objective-c uiviewcontroller ipad ios
我曾经以演示风格呈现UIViewController另一个.但它不允许我旋转(新呈现)UIViewControllerUIModalPresentationCurrentContextpresentingviewcontrollerUIViewControllerUIViewController
self.modalPresentationStyle = UIModalPresentationCurrentContext;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
当我旋转设备将旋转newViewController和statusbar,但不presentingViewController
PS:这presentingViewController是self.

使用UIModalPresentationFormSheet而不是UIModalPresentationCurrentContext
尝试这个
self.modalPresentationStyle = UIModelPresentationFormSheet;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];
| 归档时间: |
|
| 查看次数: |
1059 次 |
| 最近记录: |