Search code examples
iosios5uitabbarcontrolleruitabbaruitabbaritem

ios - UITabBar images are not rendering on the emulator


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.


Solution

  • 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