get the UIButton's background image

iphone, objective-c, uibutton, uiimageview, uiview

Solution

UIImage *image = self.myButton.currentBackgroundImage;

Apple Documentation for UIButton

Problem

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?

Original source