开发者

UIImageView to UIImage

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜