Xcode Tabbed Application - Adding New Tab view Xcode Tabbed Application - Adding New Tab view xcode xcode

Xcode Tabbed Application - Adding New Tab view


Just add two more view controllers to your project, and then control drag from the tab bar controller to the view controllers to make segues to them. Make sure you select "Relationship-viewControllers" when the list pops up. Tabs will automatically be added.

You have to go to the menu and click on "New File", then Objective-C class, and finally make sure to select UIViewController subclass. Name it and then it will add the .h and .m files. Now in your storyboard make sure to change the class of each tab to the name of your file. That's it.


For those who are visual learners:

Create a new Tabbed Application project

enter image description here

Which will give you a storyboard like this:

enter image description here

Add new View Controller

enter image description here

Add Tab Bar Item

enter image description here

Connect to Tab View Controller

Control-drag from the Tab View Controller to the new View Controller to get the menu.

enter image description here

That's it. Watch the following video for more details.


I am using Xcode 4.3.3 and I was able to add additional tabs by the following steps:

  1. Create a Tabbed Applications.
  2. Make sure Utilities is open. Pick View Controller from the Objects and drag and drop in *.storyboard.
  3. Click and hold control key. Click on Tab Controller and move the cursor to the new View Controller that you have added. When you release the mouse button and control key, you will see a popover which reads 4 options: - Relationship - View Controller, Push, Modal and Custom.
  4. If you select Relationship - View Controller option, Xcode automatically adds another tab and connects the Tab Controller to the window that you added.

From this point onwards it is pretty simple to modify the text/pictures of the tab.