旋转图像合并但不在此代码中工作 我发布我的代码 请给我解决方案
- (void)mergeImage :(UIImage *)imageA withImage:(UIImage *)imageB ###
{
UIImage *image0 = imageA;
UIImage *image1=overlayimg.image;
CGSize newImageSize = CGSizeMake(overlayimg.frame.size.width, overlayimg.frame.size.height);
UIGraphicsBeginImageContext(newImageSize);
[image0 drawInRect:CGRectMake(overlayimg.frame.origin.x,overlayimg.frame.origin.y,newImageSize.width,newImageSize.height)];
NSLog(@"Last Rotation:%f",templastrotate);
overlayimg.transform = CGAffineTransformMakeRotation(templastrotate);
CGContextConcatCTM(UIGraphicsGetCurrentContext(), overlayimg.transform);
[image1 drawInRect:CGRectMake(overlayView.frame.origin.x, overlayView.frame.origin.y,overlayView.frame.size.width,overlayView.frame.size.height)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
imageView.contentMode = UIViewContentModeScaleAspectFill & UIViewContentModeScaleAspectFit;
imageView.image=newImage;
UIGraphicsEndImageContext();
}