Setting a UIButton’s Image in Swift

yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!

yourButton.setImage(UIImage(named: “name_of_image”), forState: UIControlState.Normal)

Leave a Reply

Your email address will not be published. Required fields are marked *