I have this method to add an image over another image and obtain a merge result
- (UIImage*) createImage{
UIImage *imageToShare = nil;
UIImageView* imageView = [[UIImageView alloc] initWithFrame:[self.view frame]];
imageView.image = currentImage;
UIImageView* subView = [[UIImageView alloc] initWithImage:imageToUse.image];
[imageView addSubview:subView];
UIGraphicsBeginImageContext(imageView.frame.size);
[imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
imageToShare = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[subView release];
[imageView release];
return imageToShare;
}
it work fine because my imageToShare it's ok, but the problem is that "subView" is an image that I can rotate and pinch for zoom and move...then when I do this method subView return to its original position...what can I do to save it in its state position over imageView?