1

So i currently have a ViewController that has a tableView in it with a tab bar on the bottom. Its basically an instagram clone. However, i built all the tableView functionality and am now just getting around to playing with the tab bar items to segue to new view controllers.

I cant figure out how to attach my already created tab bar(which is inside a regular view controller) to other view controllers in IB.

The ctrl+drag from the newly created view controllers to my MAIN view controller doesn't work. It doesn't provide an option to create a view controller segue.

Below is an image of my current view controller and a brand new one to the right

Any help on how i can do this would be greatly appreciatedenter image description here

ryan
  • 187
  • 1
  • 1
  • 15

1 Answers1

1
  1. On you tabbbar controller ctrl+click and drag to the view controller you want to create a relationship to.

enter image description here

  1. Then when the little menu appears, under 'relationship segue' click 'view controllers'

enter image description here

  1. You should then end up with something like this. Continue the same process to add more relationships.

enter image description here

Beau Nouvelle
  • 6,962
  • 3
  • 39
  • 54
  • in your example...you're using a tab bar controller...im using a regular ViewController..when i control+click from the spot you specified(and have tried already)...it doesn't present me with the "Relationship segue-view controllers" option in the black pop-up – ryan Jan 28 '16 at 03:54
  • Why not use a tabar controller? There's no way I know of that will allow you to do what you're after in interface builder. The tab switching would need to be done manually. If you want to switch over to using a tabbar, select your 'view controller' > editor > embed in > tab bar controller – Beau Nouvelle Jan 28 '16 at 03:58
  • embedding it worked. The new IB situation got confusing as it automatically added a new bar on top of my old one. But i took care of that and easily linked it to a new view controller. Thanks alot – ryan Jan 28 '16 at 04:32