iOS关于uibarbuttonitem颜色设置

UIImage* itemImage= [UIImage imageNamed:@"notification-app-icon"]; 

itemImage = [itemImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

UIBarButtonItem * itemLocation =[[UIBarButtonItem  alloc]initWithImage:itemImage style:UIBarButtonItemStylePlain target:self action:nil];

主要就是要设置图片的UIImageRenderingModeAlwaysOriginal

你可能感兴趣的:(iOS关于uibarbuttonitem颜色设置)