FrozenHeart
FrozenHeart

Reputation: 20766

Strange image result for UIBarButtonItem

I want to add the following image to the UIBarButtonItem:

enter image description here

However when I set it to the "Image" property of the UIBarButtonItem via Interface Builder in XCode 6 I got the following result:

enter image description here

What am I doing wrong? How can I fix it?

Thanks in advance.

Upvotes: 0

Views: 65

Answers (1)

Jack
Jack

Reputation: 16865

By default your images get tinted using the tint color and alpha mask.

You can set it to render the original by calling

 [myBarButton setImage:[[self imageForState:UIControlStateNormal] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];

on the button!

Upvotes: 1

Related Questions