Siddiqui Siddiqui - 1 year ago 97
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];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download