iOS 7 UITabBar badge position

Keller picture Keller · Oct 3, 2013 · Viewed 8.1k times · Source

Is there any way to adjust the position of the UITabBar badge in iOS 7? The badge now blocks the tab bar icon a bit more than I would like.

iOS 6: enter image description here

iOS 7: enter image description here

Answer

Andrew Bennett picture Andrew Bennett · Jan 5, 2014

It looks like the badge is placed in a certain position relative to the image. So if you have no image, the badge is in the upper left corner of the tabBarItem.

So - to position the badge, adjust the border of blank pixels around the .png you're using for the tabBarItem image.