我已经自定义了 TabBar 的外观
I have customized the TabBar appearance such
UIImage *tabBackground = [[UIImage imageNamed:@"tab-bar-bg.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UITabBar appearance] setBackgroundImage:tabBackground];
[[UITabBar appearance] setSelectionIndicatorImage: [UIImage imageNamed:@"activetab.png"]];
如何定义自定义字体以及选中和未选中的文本颜色?
How do I define the custom fonts and the selected and unselected text colors?
谢谢,
[[UITabBarItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], UITextAttributeTextColor,
[UIFont fontWithName:@"font" size:0.0], UITextAttributeFont,
nil]
forState:UIControlStateHighlighted];
这篇关于iOS5 TabBar 字体和颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!