I've inserted 5 tab bar items into a tab bar that got inserted when I inserted a Tab Bar Controller. But the problem is that I can show only 1 item at one time.

Here is the view hierarchy of my tab bar items:

enter image description here

And in the interface builder, it shows only one item:

enter image description here

I've also tried selecting all the tab bar items but unable to see them simultaneously. Any help???

Edit: I'm using Xcode 5 with xib files.

有帮助吗?

解决方案

Just insert UITabBarController into storyboard and your UIViewControllers and then Ctrl-drag from the TabBarControler to each ViewController and select Reletainship Segue->View Controllers.

This way each ViewController will get a tabBar in the bottom and your will adjust its name and icon individidually on the ViewControllers. On the tabBarController you can adjust their order just by dragging the icons into their desired positions.

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top