Davit Siradeghyan
Davit Siradeghyan

Reputation: 6323

Set image for tab bar IOS

I'm experiencing issue when trying to set png image for tab bar item icon for my iOS application. If I'm creating png image (with transparent background) and setting it, everything works as expected, but when I'm using another png file (created by another person, or downloaded from web) it not works. Actually in my case I'm making png file from .pdf file and it's absolutely not clear for me why this not works. For more information please see screen captures below (top image represents not working one).

enter image description here enter image description here

Thanks in advance.

Upvotes: 0

Views: 986

Answers (1)

C0L.PAN1C
C0L.PAN1C

Reputation: 12233

Those specific icons/buttons work funky in terms of PNG and transparency for those images. You have to have look at the png's you download in image preview, make sure transparency exists for the white space. If there is whitespace it'll come through and show in your iOS app. Any other nonwhitepsace transparency will show up dark. It threw me off the first time I encountered this, A lot of graphics and PNG's you download from the internet doesn't have transparency built in or they have it very subtle. THose will show up as a blob for your ViewController Tabs.

Here is a good resource and guideline I found: http://steveweller.com/articles/toolbar-icons/

Upvotes: 2

Related Questions