Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to set a UIBarbutton back to the default tint color

If I change the tint of a UIBarbutton how can I reset it to it's default tint.

Here I am set a custom tint for a button...

examCancelButton.style = UIBarButtonSystemItemCancel;
examCancelButton.tintColor = myRedButtonTint;

Then later I need to set it back to it's default style and tint. So I thought just setting the style to UIBarButtonItemStyleDone would do the trick like this...

examCancelButton.style = UIBarButtonItemStyleDone;

But the color remains red. I can set it to a nice blue color on my own, but I would like to get the default color of a UIBarButtonItemStyleDone button. Is this possible?

Thanks, John

like image 332
user278859 Avatar asked Jul 12 '12 19:07

user278859


1 Answers

examCancelButton.tintColor = nil;

like image 188
Noah Witherspoon Avatar answered Nov 15 '22 18:11

Noah Witherspoon