I'm trying to make a button appear disabled without actually disabling it.
I want the greyed out color.
The button is Type Custom
in interface builder.
It has an image for the background.
I don't want to mess with image states, I simply want to change it to grey whenever I want in the same way that setting myButton.enabled = NO
sets it to grey.
So I tried setting someButton.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed
in my viewDidLoad, and even further into the app, and it's still appearing the typical bright blue color.
Is there some other property on the button I need to set/change in order to be able to control the tintAdjustmentMode myself?
I even tried my own button, using the following code, and that didn't work either.
@implementation TintableUIButton
-(id)init
{
self = [super init];
if (self) {
self.tintColor = [UIColor grayColor];
self.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed;
}
return self;
}
@end