获取UIButton的背景图片

His*_*erg 12 iphone objective-c uibutton uiview uiimageview

我需要你的建议:我想知道如何在UIImageView中设置UIButton的backgroundImage图像.

即如果我触摸按钮,则应在UIImageView上设置按钮的背景图像.

可能吗?如果是,那怎么样?

Gen*_*ari 41

UIImage *image = self.myButton.currentBackgroundImage;
Run Code Online (Sandbox Code Playgroud)

UIButton的Apple文档