How to add more tabs in tab view controller storyboard application?

31,158

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:

enter image description here

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.

Share:
31,158

Related videos on Youtube

AskMe
Author by

AskMe

Updated on December 12, 2020

Comments

  • AskMe
    AskMe over 3 years

    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?

    • AskMe
      AskMe over 11 years
      Thank you for this update.I'll check later and mau be come back if I have any problem.
    • rptwsthi
      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
      AskMe over 11 years
      I'm doing this, if someones suggested answer is working for me.Its its not working; then, how can I accept that??
  • AskMe
    AskMe over 11 years
    Well,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
    rptwsthi over 11 years
    @Jyotiranjan Did it helped you???