Piepants Piepants - 6 months ago 12
iOS Question

How to link a tab bar with its view controllers in a storyboard?

If you've only ever used a tab bar controller and not a tab bar on its own, then don't close this or mark it as a duplicate based upon your presumptions and assumptions.

I've added a tab bar to a view controller and now want to connect the tab bar with the view controllers that will be selected via it.

I've done this sort of thing many, many times before using a tab bar controller and assumed it would be just as straightforward as but when a using just a tab bar but no - I just can't find or see any way of doing it. Tried adding tab bar items to the view controller and tried dragging between these and the tab bar, and between the tab bar and the tab bar items and to the view controllers. Millions of combinations and can't get it to work.

Googling or searching for past questions on this isn't as straightforward as you'd think - because the search results all come back involving the use of a tab bar controller, I can't see anything for just a tab bar which is part of a regular view controller.

Answer

I think, this is not possible using a storyboard. You should do this in code.

Or maybe hideBottomBarWhenPushed is what you are searching for.

Comments