尝试将我的 ViewController 更改为全屏但不能
我知道关于如何使 ViewController 全屏显示有很多问题和答案。我的问题有点奇怪。我没有使用导航栏,当我尝试将 modalPresentationStyle 设置为全屏时,我的视图正在显示而不是隐藏。
I know there are many questions and answers about how to make a ViewController full screen. My problem is little odd. I am not using Navigation Bar and when I try to set my modalPresentationStyle to fullScreen my View is showing and than hiding.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是由于您没有向我们展示的代码,例如之前(选择骑行地点)视图控制器中的错误
viewWillDisappear
。您之前没有遇到过此问题,因为所呈现的非全屏视图控制器不会导致先前的视图控制器消失。
This is probably due to code you have not shown us, such as a bad
viewWillDisappear
in the previous (select place to ride) view controller.You didn't experience the issue before because a presented view controller that isn't full screen doesn't cause the previous view controller to disappear.