2

I'm working on a iOS app. I have a tabbar with 5 View Controllers. All the icons are set in the Storyboard:

enter image description here

When I launch the app, 2 are messed up. The Home (first TabBar View Controller) is practically missing and the last one (Messages) is not even looking the way it should be. I have no clue what's happening. The home tab bar icon is completely gone and the messages unselected icon is not looking the same.

I can guarantee you that all icons are in the Assets folder. enter image description here

But when I launch the app it looks like this:

enter image description here enter image description here

UPDATE: I Figured out the Message Tabbar Item (Render as: original image solved that). That's fixed. But the home item is still not showing.

Dani
  • 3,427
  • 3
  • 28
  • 54
  • Share your sample project. (With tabbar and icon images). Try this: Remove storyboard references and attach tab item connection with navigation controller directly. And then add storyboard reference for View controller – Krunal May 24 '18 at 12:09

5 Answers5

5

Try this One

Go to Assets folder. Select your tab image. On the right side under Attributes you will find "Render As". Select "Original Image".

4

After playing around for hours, I finally figured it out. Basically, since I've changed the order in that UIStoryboard, the TabBarItem in the UINagivationController of the Home View Controller was deleted. All you have to do is to add a new TabBarItem in the UINagivationController and set the image/icon you'd like.

enter image description here

Dani
  • 3,427
  • 3
  • 28
  • 54
1

Goto your view controller and select tabbar (tap on bottom icon)

and set selected image and image

enter image description here

After that goto your Image Assets and change the rendering mode to original for selected image

enter image description here

Hope it is helpful

Prashant Tukadiya
  • 15,838
  • 4
  • 62
  • 98
  • Double checked this and it's the same with my project as well. It's not that. – Dani May 24 '18 at 11:04
  • @Dani Are you doing anything programatically ? – Prashant Tukadiya May 24 '18 at 11:06
  • The only thing I have is to setup the `tabBar.tintColor`, `tabBar.barTintColor` and the `tabBar.unselectedItemTintColor`. That's it. It was all working BEFORE I've added a Container view and embedded that View Controller into the container view. – Dani May 24 '18 at 11:09
  • @Dani Could you please comment that stuff for just testing and check weather it is working of nor – Prashant Tukadiya May 24 '18 at 12:32
1

make sure all image is in your project asset folder.

Please see attach

0

make sure downloaded icons are of the size 25*25 for the 1x size. That would work.

Parth Rudakia
  • 151
  • 16
  • Nope. Sadly it didn't work. None of the icon is that size by the way. They all work. Home also worked till recently and then it disappeared. Before that it worked and I haven't touched the assets folder. – Dani May 24 '18 at 11:33