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