set color for uibutton programmatically swift code example Example: set color for uibutton programmatically swift button.setTitleColor(.red, for: .normal)