在AppDelegate中,当我试图这样做时 -
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
let controllerA = ControllerA()
let controllerB = ControllerB()
let nvc = UINavigationController()
nvc.viewControllers = [controllerA, controllerB]
window?.rootViewController = nvc
当我运行应用程序时,我的第二个控制器(ControllerB)隐藏了navigationBar或者丢失了,我根本看不到navigationBar,但是当我回到controllerA时,有一个navigationBar,为什么会发生?
我需要在secondController上安装navigationBar ...
[分辨
nvc.navigationBar.isTranslucent = false