Swift 3 - Why is my Navigation Bar not showing?

前端 未结 1 1281
猫巷女王i
猫巷女王i 2021-01-25 13:17

I have a simple app to test push notifications of a rest api. I would like to show the Navigation Bars in the App but it is not working. In my AppDelegate I have the following c

相关标签:
1条回答
  • 2021-01-25 13:52

    You are showing vcString is your LoginVC ,

    you need to use NavigationController identifier like loginView or

    You need to embded in NavigationControler before show

    let initialVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: vcString)
    
        let navi =  UINavigationController.init(rootViewController: initialVC)
    

    and

      window?.rootViewController = navi
    
    0 讨论(0)
提交回复
热议问题