Closed madlyn closed 7 years ago
Usually, the tab bar controller contains the navigation controller, not the other way. In your case, it’s inverted. As the README says, you should always present from the outer most container controller, which in your case is the outer navigation controller.
But when I did that the tabBar was hidden permanently and I couldn't get it back (See last pic)
Hmm yes, because then the bottom bar is the navigation controller toolbar, which is hidden, and the popup bar hides the tab bar. If all your pushed view controllers are tab bar controllers, you can subclass the navigation controller to return a custom bottom view, but it will not be smooth.
For best results, I suggest inverting your controller hierarchy so that the tab bar controller is the root controller. This is how it should be. Each tab should have its own navigation controller.
I'll try that, Thank you!
Description
I have a tabBar containing a tabBar that is contained in a Navigation Controller.
I tried to present the popupController from the navigation controller but it hid the tabBar permanently even when I close the popup view. So I used tabBarController?.presentPopupBar(withContentViewController: popupContentController, openPopup: true, animated: true, completion: nil) instead in both tabBars. It worked and i could see the popup everywhere in the app which is what I want but I can't present the VC over the Navigation Controller this way.
This is when I present it from the Navigation Controller
How can I present it properly?
Device, OS and Xcode Versions
Device: MacBook Pro 2016 OS: 10.12.3 Xcode: 8.2.1