我将导航 Controller 链接到我的 UIviewcontroller,如下所示:
当我登录时状态栏显示:
当我从另一个 View Controller 返回跳转到导航 Controller 时,使用方法如下:
let loginPageController=self.storyboard?.instantiateViewController(withIdentifier: "navLoginController") as! UINavigationController
UIApplication.shared.statusBarStyle = .default
self.present(loginPageController, animated:true, completion: nil)
状态栏消失了。
有人能解决吗?
最佳答案
1- 在 appDelegate didFinishLaunchingWithOptions 函数中添加此行。
application.isStatusBarHidden = false
2-并在 info.plist 文件中添加此键。 查看基于 Controller 的状态栏外观 -> 是
状态栏永远不会隐藏
关于swift - 跳转到导航 Controller 时IOS显示状态栏 swift 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40862557/