UIImage合并

UIGraphicsBeginImageContext(size);//合并后的尺寸

[image1 drawInRect:CGRectMake(0, 0, image1.size.width, size.height)];

[image2 drawInRect:CGRectMake(image1.size.width, 0, image2.size.width, size.height)];

UIImage *togetherImage = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

你可能感兴趣的:(UIImage合并)