1

I created a tab bar on a storyboard view in xCode. I set the individual images to the correct icons. (folder image, briefcase image, person image, question mark image).

Only the briefcase image shows. I have 3 images that disappear in the simulator.

I have both set it in storyboard and in code.

[_barItem1 setFinishedSelectedImage:[UIImage imageNamed:@"folder.png"]
           withFinishedUnselectedImage:[UIImage imageNamed:@"folder.png"]];

I have tried swapping the images to different locations and only the briefcase image ever appears. I have also tried making the images 30x30 px and that does not change the outcome. I have quadruple checked spelling and case-sensitivity.

The images are all included in the project.

DrDisc
  • 281
  • 4
  • 12

2 Answers2

0

I found the problem. I wasn't set up to archive yet so I didn't know it was a PNGCopy error.

See Build app with Xcode 4 - it always show some error about PNG image for how to fix it.

Community
  • 1
  • 1
DrDisc
  • 281
  • 4
  • 12
0

Xcode 7.1 - I was having the issue where my images were not showing up If you drag your images into Assets.xcassets and make sure there's an entry there, they showed up for me.

I was getting errors in the console saying that the nibs for the images I had assigned to the tab bar items (which were not in cassettes) could not be loaded. Once I moved them into Assets.xcassets and repointed my tabs to these images for both the "Tab Bar Item" and "Bar Item" the tag icons appeared correctly in the simulator.

DaveR
  • 91
  • 5