如何把两张图片拼在一起

- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2
 {  
    UIGraphicsBeginImageContext(image1.size); 
    //Draw image1  
    [image1 drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];  
    //Draw image2  
    [image2 drawInRect:CGRectMake(0, 0, image2.size.width, image2.size.height)];  
    UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();  
    UIGraphicsEndImageContext(); 
    return resultingImage;  
}

    原文作者:yuedong56
    原文地址: https://blog.csdn.net/yuedong56/article/details/51159910
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞