之前想改的时候一直没找到对应的函数,以为不能改。偶尔在stackoverflow看到了解决方式,代码如下:
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"AmericanTypewriter" size:20.0f],UITextAttributeFont,[UIColor yellowColor],UITextAttributeTextColor,[UIColor redColor],UITextAttributeTextShadowColor,[NSValue valueWithUIOffset:UIOffsetMake(0.0f,1.0f)],UITextAttributeTextShadowOffset,nil] forState:UIControlStateNormal];
参考:http://stackoverflow.com/questions/11343894/change-tabbar-text-color-iphone