简体   繁体   中英

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):

在此处输入图片说明

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):
在此处输入图片说明

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

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.

邮件图标

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

我最后要做的是使用awakeFromNib方法中的选项卡图像使用UIImageRenderingModeAlwaysOriginal设置...似乎可以解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM