gpt4 book ai didi

swift - 如何使用导航栏而不是表单显示全屏

转载 作者:行者123 更新时间:2023-11-30 10:25:49 25 4
gpt4 key购买 nike

我有一个登录页面,位于导航 Controller 内,登录后它会将您带到选项卡栏 Controller ,我遇到的问题是选项卡栏 View 显示为表单,因此我仍然可以在 View 顶部看到登录页面,因为导航栏未显示,因此存在间隙我读过这是 iOS 13 中的默认行为

如何更改此设置,使其覆盖全屏并显示导航栏?

最佳答案

尝试以下方法

let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen //or .overFullScreen for transparency
self.present(vc, animated: true, completion: nil)

关于swift - 如何使用导航栏而不是表单显示全屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60058339/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com