Dani
Dani

Reputation: 3637

UITabBar Icons not appearing correctly

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.

Upvotes: 2

Views: 3888

Answers (5)

Dani
Dani

Reputation: 3637

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

Upvotes: 4

Parth Rudakia
Parth Rudakia

Reputation: 161

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

Upvotes: 0

Trupesh Vaghasiya
Trupesh Vaghasiya

Reputation: 514

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".

Upvotes: 6

AbecedarioPoint
AbecedarioPoint

Reputation: 195

make sure all image is in your project asset folder.

Please see attach

Upvotes: 1

Prashant Tukadiya
Prashant Tukadiya

Reputation: 16436

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

Upvotes: 1

Related Questions