I want put over an UIImage a small UIImageView and I want as result an UIImage, what can I do?
1 Answer
You have to create a new graphics context (UIGraphicsBeginImageContextWithOptions()), then draw the two images into the context (-[UIImage drawInRect:]), and then retrieve an image from the context (UIGraphicsGetImageFromCurrentImageContext()).
Don't forget to call UIGraphicsEndImageContext() at the end.
2 Comments
Ole Begemann
No, I won't. I pretty much listed every single call that you need above. With the help of the documentation, you should be able to figure out the rest pretty easily.
ader
blackguardian, at least try yourself first and ask then for assistance if you have a problem.
UIImageViewhas an associatedUIImage, so what you really want is to “merge” twoUIImages. Now what do you mean by “merging”? Simply painting one over the other?