Home > Net >  Navigation Bar not showing up
Navigation Bar not showing up

Time:11-18

This is my code in scene delegate

    guard let windowScene = (scene as? UIWindowScene) else { return }
          window = UIWindow(frame: windowScene.coordinateSpace.bounds)
          window?.windowScene = windowScene
          let navController = UINavigationController(rootViewController:HomeViewViewController())
          window?.rootViewController = navController
          window?.makeKeyAndVisible()
   

And in my home page I do not see any navigation Bar

I am using xib and Xcode 13.1

Any help is appreciated

CodePudding user response:

if you initialise a rootController programmatically you also have to remove reference to main storyboard from:

1.Info.plist

enter image description here

2. Deployment info

enter image description here

  • Related