Disabling a UIButton
suggest changeA button can be disabled by
Swift
myButton.isEnabled = false
Objective-C:
myButton.enabled = NO;
The button will become gray:
If you don’t want the button appearance to change when disabled set adjustsImageWhenDisabled
to false
/ NO
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents