简体   繁体   中英

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?

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.

I didn't understand your question completely.

For getting image from UIImageView

UIImage *image = imageView.image;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM