xcode disable a button

Swift
myButton.isEnabled = false;
Source

Also in Swift: