是否可以在内容模式下合并两个UIImageViews?我有两个UIImageViews,一个是AspectFit,一个是Aspect Fill,当我混合两个图像时它正确组合而不是精确的内容模式。
这是代码
CGSize newSize = CGSizeMake(fx_imageView.image.size.width,fx_imageView.image.size.height);
UIGraphicsBeginImageContext( newSize );
// Use existing opacity as is
[fx_imageView.image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
// Apply supplied opacity if applicable
[broderImage.image drawInRect:CGRectMake(0,0,newSize.width,newSize.height) blendMode:kCGBlendModeNormal alpha:1];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// resultImage.image = result;