enable and disable a button with code in xcode code example Example: xcode disable a button myButton.isEnabled = false;