swift 5 button image code example Example: swift add image to button myButton.setImage(UIImage(named: "myImage"), forState: .normal)