1

The attributes set for UITabBarItem UIControlStateNormal overrides of UIControlStateSelected!

[navigationCtrl.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [Util colorFromHex:@"474747"], UITextAttributeTextColor, [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(1.0, 1.0)],  UITextAttributeTextShadowOffset, nil] forState:UIControlStateNormal];

[navigationCtrl.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [Util colorFromHex:@"FCFCFC"],UITextAttributeTextColor, nil]  forState:UIControlStateSelected];

Why?

Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219

0 Answers0