I have UIImageView contains static image, I want to get this image and set it under UIImage variable.
How can I do that?
UIImageView *imageView = ... // Set from somewhere
UIImage *image = imageView.image; // Get the UIImage.
UIImage *otherImage = [UIImage imageNamed:@"Icon.png"]; // Load another image.
imageView.image = otherImage; // Change in the image in your UIImageView.
UIImageView Class Reference at developer.apple.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With