Adding new tabs to a tab bar controller

mvasco picture mvasco · Apr 28, 2014 · Viewed 66.6k times · Source

I am creating a tab bar iOS app. The tab bar view controller has two tabs, each of them connected to a view controller.

This how it looks:

enter image description here

I need to add more tabs to the tab controller. I am doing it at the storyboard as follows:

  1. I add a new view controller.
  2. I control-drag from the tab bar controller to the new created view controller.
  3. A window opens and I select Relationship Segue-View Controller.
  4. The segue from the tab bar controller to the new view controller is created.

I think that is the way to do it, but after that the tab bar controller doesn't show any tab icons, the tab bar becomes grey.

Like this:

enter image description here

I need to know what am I doing wrong.

Answer

Pandey_Laxman picture Pandey_Laxman · Apr 28, 2014

First drag A TabBarController from Object Library you see that only two tabs with thier VC there.

to add more Tab Item in TabBarVC drag VC from Object Library

Then Control drag from TabBarVC to Newly VC then Segue relation pop ups

Select last one Relationship Segue -> View Controllers

Here is the Screen