0

I want put over an UIImage a small UIImageView and I want as result an UIImage, what can I do?

1
  • 1
    The UIImageView has an associated UIImage, so what you really want is to “merge” two UIImages. Now what do you mean by “merging”? Simply painting one over the other? Commented Jun 6, 2012 at 14:20

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
blackguardian, at least try yourself first and ask then for assistance if you have a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.