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
Which will give you a storyboard like this:
Add new View Controller
Add Tab Bar Item
Connect to Tab View Controller
Control-drag from the Tab View Controller to the new View Controller to get the menu.
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:
- Create a Tabbed Applications.
- Make sure Utilities is open. Pick View Controller from the Objects and drag and drop in *.storyboard.
- 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.
- 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.