shreyashirday
shreyashirday

Reputation: 900

UITabBar Image is not clear

I just recently got a new set of icons for my app (from an external designer) and I am trying to implement them, but for some reason it ends up looking like this (the new icon is the one in the middle):

enter image description here

I have tried setting the image of the tab bar to have UIImageRenderingModeAlwaysOriginal, but that's given me no luck.

Here's the icon (it kind of blends into the background but its a white envelope):
enter image description here

Any reason why this is happening and how I can fix?

Upvotes: 0

Views: 116

Answers (2)

shreyashirday
shreyashirday

Reputation: 900

What I ended up doing was setting using UIImageRenderingModeAlwaysOriginal for the tabbar image in the awakeFromNib method...that seemed to fix the issue.

Upvotes: 0

rebello95
rebello95

Reputation: 8576

The problem is that the entirety of your image is opaque - at least part of it needs to be transparent to appear as you want it to.

In the below image (since the entire thing is white now, it's directly below this text), I have removed the black line and made that transparent. I then added this image to a tab bar, and it worked fine for me.

Mail Icon

Here's the link to the image, as well.

Upvotes: 1

Related Questions