Search code examples
iosuitabbarcontrolleruitabbaritem

UITabBar item title repeated in the bottom left corner - visual bug


I have UITabBarController with tabBarItems set in (inherited) code. For some strange reason I can't figure out, the title of the first tabBarItem is repeated in gray in the bottom left corner of the tabbar. I believe I've even seen 2 titles overlapping there. Any idea about the root cause of this? Thanks.

enter image description here


Solution

  • I figured out finally! The call to setupTabBar() where the icon title and selected/deselected images was made too early in create() function, i.e. during viewController initialization. I've moved it to viewDidLoad() and now the visual bug is gone. Thanks again!