简体   繁体   中英

UITabBarController icons not showing up

I have an app that has a UITabBarController with four view controllers embedded.

I've created icons for both normal and selected states and set them via the interface builder. The sizes of the individual icons vary slightly according to the new design guidelines . Also the icons are PDFs. I initially set it's Render As property to Template Image.

The titles of the tab bar icons show up but not the icons.

在此处输入图片说明

But they do show up in the interface builder though.

在此处输入图片说明

Then I set the Render As to both Original and Default but neither worked.

I'm using Xcode 10.1. What am I missing here?

It seems problem with image you are using. try setting different insets to image and tab bar icon will appear.

i have set some inset for icon and icon appeared in simulator.so you will need proper icon image for asset or would required proper inset for icons.

在此处输入图片说明

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