Possible Duplicate:
Xcode 4.2 Tabbed Application - Adding New Tab view
I'm new to iPhone app and I followed following tutorial to develop a tab view application using story board:
It's working fine.Thanks to the Author. :)
Now, I want to add couple of more tabs to the main view(default, its 2 tabs; I want 3 or 4).
How Can I do it?
To add a tab, first drag a new View Controller object to the storybard. Next control-drag from the tab bar controller to new view controller and select view controllers under Relationship Segue . Your tab bar controller will update with a new tab.
Add one view controller (UIViewController) And Add it with your tabBarController in relationship "View Controllers"(To do this right click on tab bar controller and drag it to new view controller and select bottom most relationship seague, i.e. view controller), your XIB page should look like:
You can apply same pattern for the rest.
As @Jamie Said: 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 files. Now in your storyboard make sure to change the class of each tab to the name of your file. i.e. to assign custom class for your ViewController this I have used Name AAA for that in Image.
Just add one more View controller on the screen drag it from the controls, then hold the right click on tab bar controller bring that click on the newly added view controller and left the click the four options will be appear there choose the topmost option by clicking on it its name is "Relationships-view controllers" . and its done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With