Search code examples
iphoneios6uiimageviewuiimagexcode4.5

How to get the Image from a UIImageView?


I am new in iOS application Development. I need help on UIImageView. I need to send an Image to the server which the user will sketch. In my application i am using UIImageView on which user can sketch and fill colors etc its like a pain application. now i need to send that sketch to server as user will click on UPDATE button. for sending the data through web service, i have to send it as a binary string i think. every thing is working fine and clear to me. The problem is how to get the image from UIImageView with out saving it to core data or sq-lite as i don't want to save that image permanently.

Is it Possible to get UIImage from an UIImageView without using core data or sq-lite?


Solution

  • If you need to Get UIImage for UIImageView then try this.

    UIImageView *imageView = ... //here is your UIImageView.

    UIImage *image = imageView.image; //Here is you UIImage

    if any issue please let me know.