I'm having an issue with a UIBarButtonItem
. I use the appearance proxy to set its color for states Normal
and Disabled
and I do this in the viewDidLoad
method of the UIViewController
. However, the button gets the Normal
color, even when it is disabled (and it is definitely disabled because the IBAction
method is not being called).
The question is similar to this one text color of disabled uibarbuttonitem is always the color of the normal state, however, the solution posted here does not work for me.
My app is for iOS 8.2 and I'm using Xcode 6.2
Any ideas?
EDIT:
I am not sure if this is helpful for finding the solution, but when I create my button using initWithImage:
instead of initWithTitle:
everything seems to be working well. Could this be an Apple bug?