Search code examples
objective-cxcodeuitabbarcontrollerviewcontrollertabbar

Xcode Multiple viewcontrollers for a Tab in a TabBar Controller


I have multiple viewcontrollers for a single tab in a tabbar controller.

In the initial viewcontroller, it shows the tabbar with two items. There is also a button that takes you to the second viewcontroller. I want the second viewcontroller to have the initial tabbar controller with the two items. It currently displays no tabbar controller.

How do I achieve this?

enter image description here

Thank you in advance.


Solution

  • Doh! I solved my own question.

    I was using the "present modally" segue, when instead, the "show" segue will automatically include the root tabbar and navigation controller.