I want to upload an image to a server. I can do this and it works with a UIImage. However, I want to upload the current image being displayed in my application which is within a UIImageView.
How can I pass, or temporarily store the UIImageView image within an UIImage? I have tried the following however it does not work.
UIImage *myImage = imageView.image;
What you have should work, what kind of error are you getting? Alternatively you could try this…
or even better…
but why do you even need to allocate a UIImage when you already have one in the UIImageView? Just use imageView.image directly…