Siddiqui Siddiqui - 1 year ago 56
iOS Question

How do I get an image from an UIButton?

I have Custom Buttons in my application in which I have set images. I want to get image from button and stored in UIImage variable. Kindly Guide me.

Answer Source

How about this?

UIImage *img = [button imageForState:UIControlStateNormal];