ios - 全屏显示 ViewController

标签 ios objective-c viewcontroller ios13 presentviewcontroller

我在按钮操作中展示了一个 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];
但它没有出现在手机的全屏上。它呈现如下
enter image description here
如何在全屏上呈现它。非常感谢任何帮助

最佳答案

在 iOS 13 中,默认演示样式已更改。如果你想要 iOS 12 的演示风格,你可以更改 modalPresentationStyle.fullScreen .
swift 版本

navigation.modalPresentationStyle = .fullScreen
Objective-C
navigation.modalPresentationStyle = UIModalPresentationOverFullScreen;

关于ios - 全屏显示 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63012919/

相关文章:

ios - 推送导航 Controller 后如何移动 View ?

ios - 恢复ViewController状态的最佳方法是什么

iphone - 复制工作应用程序并删除和重命名内容以制作新应用程序?

iphone - 如何处理以下 Web 服务响应?

objective-c - iOS:NSUserDefaults 和 UIImageViews

ios - iPhone 7 Plus AVPlayer 周围有边框(白色颜色不匹配)

objective-c - makeKeyAndOrderFront 也不做

objective-c - 在UITableView中显示字典数组

ios - 将已编辑的 UIImage 的更改保存到同一文件

ios - 检查 UIButton 是否被按下