繁体   English   中英

全屏显示 ViewController

[英]Presenting the ViewController in full screen

我在按钮操作中展示了一个视图 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

物镜 C

navigation.modalPresentationStyle = UIModalPresentationOverFullScreen;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM