全屏显示 ViewController

Presenting the ViewController in full screen

我在按钮操作中呈现一个视图控制器,如下所示,

PromptController *obj = [[[PromptController alloc]initWithNibName:@"PromptController" bundle:nil]autorelease];
UINavigationController *navigation = [[[UINavigationController alloc]initWithRootViewController:obj]autorelease];    
[self presentViewController:navigation animated:YES completion:nil];
[AVSession stopRunning];

但它没有在 phone 的全屏上呈现。呈现如下

如何全屏显示。非常感谢任何帮助

在 iOS 13 中,默认的演示文稿样式已更改。如果你想要 iOS 12 种呈现方式,你可以将 modalPresentationStyle 更改为 .fullScreen

Swift版本

navigation.modalPresentationStyle = .fullScreen

Objective C

navigation.modalPresentationStyle = UIModalPresentationOverFullScreen;