在iOS 5中具有更多外观控制,我们如何更改UITabBarItem文本颜色?从默认白色到其他颜色?
编辑:工作解决方案
[[UITabBarItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], UITextAttributeTextColor,
[UIColor whiteColor], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont,
nil]
forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud) 如何在iOS 7中更改UITabBar和UITabBarItems的文本和图标颜色?对于未选中的tabbar项,默认的灰色文本看起来很暗,难以阅读.