Shubhashis
Shubhashis

Reputation: 10631

Nothing shown at tab bar controller items when storyboard reference is added

I have a tab bar controller and there are some view controllers attached to it. All of the view controller names and their corresponding items show up perfectly at the tab bar. The problem occurs when I try to add a Storyboard reference to it. Nothing is shown at the tab bar for that particular item(storyboard) when I run it. Although it shows up perfectly on the UI design.

[screenshot[1]

another screenshot

Notice that the 3rd item (the storyboard reference) is invisible. Also, the invisible Storyboard reference works. Meaning, if I click on the invisible place it takes me to the proper storyboard.

I have seen some answers from here.

Refactoring to storyboard works. But I don't want to use it. Refactoring to storyboard creates a storyboard reference anyway. And it works perfectly. But when I create a storyboard reference, it doesn't work and stays blank.

Now, how should I add a storyboard reference to tab bar controller so that it shows up the name and the icon?

Upvotes: 2

Views: 355

Answers (1)

Pasosta
Pasosta

Reputation: 855

After the storyboard reference is correctly connected but the icon image doesn't appear, go to the initial view controller that is in the storyboard being referenced from the tab bar and make sure that the view of the initial view controller has a Tab Bar Item.

enter image description here

If it does, then add the desired image to the Tab Bar Item connected to the view. If the connected storyboard view does not have a Tab Bar Item, then add one and set the desired title and image. For other potential fixes this post is pretty good.

Upvotes: 1

Related Questions