我在按钮操作中展示了一个 View Controller ,如下所示,
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];
但它没有出现在手机的全屏上。它呈现如下如何在全屏上呈现它。非常感谢任何帮助
最佳答案
在 iOS 13 中,默认演示样式已更改。如果你想要 iOS 12 的演示风格,你可以更改 modalPresentationStyle
至.fullScreen
.
swift 版本
navigation.modalPresentationStyle = .fullScreen
Objective-C navigation.modalPresentationStyle = UIModalPresentationOverFullScreen;
关于ios - 全屏显示 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63012919/