0

I have an image that looks like this:

enter image description here

I am trying to make it render on the UITabBar and here is what I did. I went in XCode to File --> Add Files to Project, then I chose the files I wanted and they got added.

Then when I clicked on the files, on the right side of the screen, under "target membership" the checkbox was checked.

But when I added the file name to the UITabBar item, the emulator showed a blank rectangle instead of just empty space...so it recognized the image...but it didn't render that image.

Would someone happen to know what I did wrong? Are the dimensions of the image supposed to be rectangle or square? I have 48x48 square png file.

GeekedOut
  • 16,905
  • 37
  • 107
  • 185
  • The tabbar should accept both square and rectangle images. What's the image filename, are you using both standard and @2x images? Have you tried any other images instead to see if they show up? If they do I would suspect there's something wrong with the image itself. – Liam Aug 18 '12 at 15:28
  • @Liam the image file name is house-48.png and I tried exactly that name and without the .png ....I am not sure what is the difference between the standard and 2x images - could you please explain what you mean? – GeekedOut Aug 18 '12 at 15:33
  • I did try another image and I had the same thing happen where there is a placeholder rectangle that rendered, but not the actual image. – GeekedOut Aug 18 '12 at 15:33

1 Answers1

4

Can you check your image info?

These are the guidelines for UITabBar image:

  • 30x30 (48x32)
  • PNG
  • Anti-aliased
  • Transparency set

Custom Icon and Image Creation Guidelines

manikal
  • 953
  • 7
  • 30