display original image color with UIBarButtonItem
- by user262325
I used codes below to display a image on an UIBarButtonItem
UIBarButtonItem *myButtonItem;
myButtonItem= [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"image.png"] style:UIBarButtonItemStylePlain target:self action:@selector(pressB:)];
but the image color is two colors(red/blue), but the image displayed on the ButtonItem is white.
Iy looks like IOS change it to white color automatically.
Welcome any comment