标签:
//主题设置
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"tabbar-light"]];
NSDictionary * dict = @{
NSFontAttributeName : [UIFont systemFontOfSize:14],
NSForegroundColorAttributeName : [UIColor grayColor]
};
//key 定义在NSAttributedString.h
NSDictionary * selectDict = @{NSForegroundColorAttributeName : [UIColor darkGrayColor]};
UITabBarItem * item = [UITabBarItem appearance];
[item setTitleTextAttributes:dict forState:UIControlStateNormal];
[item setTitleTextAttributes:selectDict forState:UIControlStateSelected];
标签:
原文地址:http://www.cnblogs.com/PJXWang/p/5854848.html