How to chage the Color of text in UITabBarItem?
In UITabBarItem how to change the开发者_C百科 color of text..By default the text is appearing in whiteColor. I want to change to black, how to do it?
In ViewController.m
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self)
{
[self.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor greenColor],UITextAttributeTextColor,nil] forState:UIControlStateNormal];
}
return self;
}
精彩评论