この方法で画像を別の画像に追加し、マージ結果を取得します
- (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;
}
私のimageToShareは大丈夫なので問題ありませんが、問題は「subView」が回転してピンチしてズームおよび移動できる画像であることです...次に、このメソッドsubViewを実行すると、元の位置に戻ります...何ができるかimageView 上の状態位置に保存するにはどうすればよいですか?