在内容模式方面合并两个UIImageView?

时间:2013-06-25 17:28:38

标签: ios uiimageview uiimage

是否可以在内容模式下合并两个UIImageViews?我有两个UIImageViews,一个是AspectFit,一个是Aspect Fill,当我混合两个图像时它正确组合而不是精确的内容模式。enter image description here

这是代码

 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;

0 个答案:

没有答案