//原来的
self.tabBarItem.title = @"设置";
NSData *data = [USER_DEFAULT objectForKey:kSAVED_BK_COLOR];
UIColor *col = [NSKeyedUnarchiver unarchiveObjectWithData:data];
[self.tabBarItem setFinishedSelectedImage:[ImageNamed(@"tab3_sel") imageWithTintColor:col]
withFinishedUnselectedImage:ImageNamed(@"tab3")];
//ios7+方法
// UIImage *selimage = [[ImageNamed(@"tab3_sel") imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
// UIImage *noselimage = [ImageNamed(@"itab3") ModeWIImage *noselimage = [ImageNamed(@"itab3") ModeWp. [[ UITabBarItem alloc] initWithTitle:@"設定" image:noselimage selectedImage:selimage];
第二個是ios7之後的方法,因為ios7之後方法必須加imageWithRender方法,就無法使用Blend方法了,就達不到我想要的結果了
預設
高亮
選取