12
votes

I need your suggestions: I want to know how to set the UIButton's backgroundImage image in UIImageView.

i.e. If I touch on the button, the button's background image should be set on UIImageView.

Is it possible? If yes then how?

1
And its not click its touch :)Richard J. Ross III
why did this get downvoted? my upvote took it to 0! The question is very useful - Apple broke their naming convention for this one class only, making it hard to discover the property even exists :(Adam

1 Answers

42
votes
UIImage *image = self.myButton.currentBackgroundImage;

Apple Documentation for UIButton