I have a UITabBarController
containing four view controllers. The first two of these are storyboard references to the same external storyboard: "BookTable" in the image below.
I want to set different tab bar icons for these two items, but I can't work out how. If I don't set the tab bar item properties in the embedded storyboard, then there is no tab bar present in the running app, even if I have configured the tab bar in the controller. See the storyboard and the simulator below:
If I set the tab bar item properties in the embedded storyboard, then the tab bar item is the same for both:
If I set the tab bar item properties in code, nothing changes:
class TabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
tabBar.items![0].title = "Test Item 1"
tabBar.items![1].title = "Test Item 1"
}
}
I there a way to do this, or will I have to duplicate my storyboard just to set a different tab bar item?