1

为 UITabBarItem UIControlStateNormal 设置的属性覆盖了 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];

为什么?

4

0 回答 0