Check out example codes for "set color for uibutton programmatically swift". It will help you in understanding the concepts better.

Code Example 1

button.setTitleColor(.red, for: .normal)

Learn ReactJs, React Native from akashmittal.com