0

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

Martin Koles
  • 5,177
  • 8
  • 39
  • 59
  • Is you screen name in dashboard tab is "Dashboard"? – Karthick Selvaraj Aug 18 '17 at 13:22
  • Someone has to be doing something with UIKit views that they shouldn't be. I would look for methods that are overridden that usually aren't. – allenh Aug 18 '17 at 13:32
  • Specifically, is `layoutSubviews` overridden in a custom subclass of UITabBar? – allenh Aug 18 '17 at 13:34
  • Thanks, 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! – Martin Koles Aug 18 '17 at 13:35

1 Answers1

0

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!

Martin Koles
  • 5,177
  • 8
  • 39
  • 59