2
votes

So I have this application where I have a view controller (which I want to appear first when the app starts) and a tab bar controller. I also have other navigation bar controllers that are in the tab bar controller. I want to place my view controller on top of the tab bar controller. Making the tab bar controller the parent of the view controller would be better though.

like this :

But take note, I do not want a tab bar item to represent the view controller and I want the tab bar to appear along with the view controller. I do not and would not want to use storyboards as much as possible. How can i achieve this?

1
So this special view controller is shown until a tab is selected, then it's removed and never accessible again?Wain
@Wain yup. it is removed but still accessible. i'll make a "home button" on the navigation bar to make it accessible again.rainbowbutterunikitteh
So you can just add it as a subview when required and remove it when any of the tabs are tapped (in the callback), and it's all done in code.Wain

1 Answers

1
votes

I guess the simplest solution would be to use a screenshot of your tabBar and put it in your HomeViewController as a button. In this case you could use your HomeViewController as rootViewController and in the button action you set the TabBarController as the rootViewController.

Root = Home + Button
-->
Root = TabBar

Perhaps you need four buttons, if you want the correct tab to be selected.