无法将UIBar按钮设置回默认的色调颜色

use*_*859 16 iphone xcode uibarbuttonitemstyle ipad

如果我改变UIBar按钮的色调,我怎么能将它重置为默认色调.

在这里,我为按钮设置了自定义色调......

examCancelButton.style = UIBarButtonSystemItemCancel;
examCancelButton.tintColor = myRedButtonTint;
Run Code Online (Sandbox Code Playgroud)

然后我需要将它设置回它的默认样式和色调.所以我认为只需将样式设置为UIBarButtonItemStyleDone即可完成这样的操作......

examCancelButton.style = UIBarButtonItemStyleDone;
Run Code Online (Sandbox Code Playgroud)

但颜色仍然是红色.我可以自己设置一个漂亮的蓝色,但我想获得UIBarButtonItemStyleDone按钮的默认颜色.这可能吗?

谢谢,约翰

Noa*_*oon 29

examCancelButton.tintColor = nil;