嗨,这将适用于您想做的事情
// Customize the UIBarButtonItem
UIImage *button30 = [[UIImage imageNamed:@"button_textured_30"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
UIImage *button24 = [[UIImage imageNamed:@"button_textured_24"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
[[UITabBarItem appearance] setBackgroundImage:button30 forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UITabBarItem appearance] setBackgroundImage:button24 forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone];
[[UITabBarItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:82.0/255.0
green:82.0/255.0
blue:82.0/255.0
alpha:1.0], UITextAttributeTextColor,
[UIColor colorWithRed:242.0
green:237.0
blue:237.0
alpha:1.0], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0,1)], UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Helvetica" size:0.0], UITextAttributeFont,nil]
forState:UIControlStateNormal];
快乐编码:)