0
votes

I have an iOS app written in Swift with UITabBarController with 5 UIViewControllers. Now, I have a bunch of UIViewControllers that are not part of the UITabBarController. I'd like to be able to show that same tabbar but I have no idea how to do that. Any clue?

More details: This is one of the View Controllers that the tabbar has. I use storyboard references and split my view controllers into separate more manageable storyboards.

So, the big picture:

enter image description here

There's no initial ViewController since I use storyboardId to get to the initial Navigation Controller. From there we have a ViewController embedded in the same Navigation controller. In that ViewController, there are 2 Container views - one of the size of the bottom ViewController that contains the "hamburger" button that toggles the other Container View which has an embedded UITableView in. When a specific cell is selected it should go to Profile ViewController that's not even in the same storyboard. The segue is set to be Push. Either way, doesn't show the UITabBar on the Profile ViewController

enter image description here

1
How are you presenting/showing the other UIViewControllers? If they are being pushed on to a UINavigationController that's part of the UITabBarController hierarchy then the tab bar should be visible.Mihai Fratu
Well, it depends but I have my entire project split into many Storyboards and connected via storyboard references. So, the segue could be whatever I make it to be I thinkDani
Well, as I said, if for example one of your UITabBarController has a UINavigationController as one of it's items whenever you push a new UIViewController on it's stack the tab bar stays in place. If you'd modally present it the tab bar will be hidden.Mihai Fratu
@MihaiFratu I think I'm doing something wrong because it's not working. I've added more details and some screenshots in the post itself. Can you please take a look at that?Dani

1 Answers

0
votes

how you doing? I don't know if I understood, but you are trying to show tabbar after going to another screen, right? If the answer is 'yes', try to change your segue to show(e.g. push).

-----Edit-----

You can do with two ways:

  1. Presenting Modally -> using Current Context

enter image description here

  1. Use push(e.g.) with a navigation view controller, you can also hide the navigation bar if you go to Navigation controller -> Attributes inspector -> Navigation Controller -> Uncheck Shows Navigation Bar

enter image description here

Hope now it works! Best regards