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