The bar item images I prepared are about 35*35 and I use the Sketch to export the [1x & 2x] size images; (I can't insert any images for instances at here because of my zero reputation//Sorry about this!)
Then it displays a blue square :<
the function and title of Item is OK
BUT just the icons are wrong
Could someone tells me how to fix it! Appreciate!!!
I figure it out!
There is nothing wrong with your code or setting
It's about your IMAGEs
You can just look at the apps on your phone.(almost)Any tab bar item icons are in gray.
So the Icon will just display their UN Hollow parts in gray!!
[Additionally,according to official API,they wrote like this:
By default, unselected and selected images are automatically created from the alpha values in the source images . To prevent system coloring, provide images with UIImageRenderingModeAlwaysOriginal .
]
Consequently the solution is : USE Sketch to make your instance's icon heart-part to be hollow
你也需要添加@ 3x图像。
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.