How to add more tabs in tab view controller storyboard application?
Solution 1
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.
To Add Controller Files
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.
Solution 2
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.
Related videos on Youtube
AskMe
Updated on December 12, 2020Comments
-
AskMe over 3 years
Possible Duplicate:
Xcode 4.2 Tabbed Application - Adding New Tab viewI'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?
-
AskMe over 11 yearsThank you for this update.I'll check later and mau be come back if I have any problem.
-
rptwsthi over 11 years+ 1 for Inder Kumar Rathore and Dear jyotiranjan I believe You wanted to comment on the Answer.. Also If Any Answer helps you then You are suppose to accept that answer by clicking on tick mark next to it. To Encourage the replier...
-
AskMe over 11 yearsI'm doing this, if someones suggested answer is working for me.Its its not working; then, how can I accept that??
-
-
AskMe over 11 yearsWell,Thank you all for your answers.Here the problem I'm facing is ; I'm able to add view controller and if I right click I see 4 options(from where I need to choose "relationship").But,when I'm dragging the tab bar controller to the view controller , its going back to "object library window".How can I do this??
-
rptwsthi over 11 years@Jyotiranjan Did it helped you???