Reputation: 161
I'm having a strange issue where I cannot set a button image (or a UIImageView.image) programmatically. I can set the image in the storyboard, but if I try to change it, the app freezes up. Example. I have copied the image into the folder and can use that image to set the button in storyboard.
[self.picButton setImage:[UIImage imageNamed:@"myImage.png"] forState:UIControlStateNormal];
Upvotes: 0
Views: 831
Reputation: 21
Make sure to add widget target for the images or other assets you want to use in the widget.
Upvotes: 2