Search code examples
iosswiftuinavigationcontrolleruitabbarcontroller

black screen appears in the tab bar after navigation controller


enter image description here

if I press the third tab bar (tab bar index : 2), and it opens RequestVC, it will show a black screen like the picture below, so I can't see my label. and I don't know why the green icon in the bottom dissapears

enter image description here

I don't understand why this happens. I just uncheck "transculent" in the navigation bar, and in the NewRequestVC I also check "Hide Bottom bar on Push"


Solution

  • I recreate your storyboard, it's working fine for me.

    Try these steps:

    1. delete your navigation controller
    2. embed your request VC in navigation controller
    3. connect your main tab bar to navigation controller relationship segue as view controllers.
    4. Try you restart Xcode?

    If there is nothing wrong in storyboard then probably in your code.