frkncngz
frkncngz

Reputation: 125

Combining two UIImageView to an UIImage with respect to their current size, rotation and positions

In one of my apps I am trying to combine two UIImageViews into a single UIImage. Bottom one is from the camera and the top one is something like a badge. The user can drag, rotate and scale the one at the top.

My question is, how can i save these two UIImageViews into a single UIImage at the end of all drag, rotate and scale operations?

Edit: I want to keep the original size of the bottom image.

Upvotes: 0

Views: 420

Answers (1)

Vinzzz
Vinzzz

Reputation: 11724

This post : Saving UIView contents in iOS 4 with real size of the images inside (i.e. scale contentes up for save) shows how you can get a UIImage from any UIView.

Basically, you can adapt its solution, using a UIView container for your 2 UIImageViews.

Upvotes: 1

Related Questions