4

I am trying to create a UITabBarController from a Nib.

In my project, I do not use Storyboards at all, I prefer going the Nib method, as it makes the project much more managable.

So here is what I did so far

I create a new CocoaTouch class file and I check the Also Create XIB File

Screenshot 1

Then I got two files

Screenshot 2

But in the xib file, I didnt get the usual UITabBarController as how we usually get from a Storyboard UITabBarController. I only got a View..

Screenshot 3

I am wondering what is the proper way to create a UITabBarController usig NIB/Xib?

Thank yu!!

Community
  • 1
  • 1
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135

1 Answers1

4

you have to delete that XIB and drag a Tab Bar Controller to the canvas . set you class to that file . or either you can see this video tutorial that will help you to understand how you can use XIB/Nib file for Tab bar controller and to add ViewController to the tab bar controller and set title for each tab .

https://www.youtube.com/watch?v=NfEK9JsCyXM