carndacier
carndacier

Reputation: 960

tab bar image displayed good in storyboard but not in simulator

I have a problem. I add some png files to my project, in my root folder. I have a tabbar controller. On each view, I changed the title and the picture of each items.

In my storyboard, images and title are well displayed. But when I launched the app on the simulator, titles and images are not set...

I tried to clean / build the solution, disconnect the simulator, reconnect it, exit XCode, launch it again.

Have you an idea why ?

Upvotes: 2

Views: 1241

Answers (3)

macio.Jun
macio.Jun

Reputation: 9895

I actually did not add images under Assests.xcassets. After I relocated images from other location in the project to Assests.xcassets, images are displayed correctly.

Upvotes: 1

carndacier
carndacier

Reputation: 960

I found the solution !

If it could be useful for someone...

In the "copy bundle Ressources", the Main.storyboard wasn't here. I just added it, rebuild, run again, and all works !

Upvotes: 2

Rahul Mathur
Rahul Mathur

Reputation: 882

I faced the same issue in my app, i replaced default tabbar buttons with custom buttons and gave background image to that with more easy customisation.

Upvotes: 0

Related Questions