标签:
- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {
UIGraphicsBeginImageContext(image1.size);
// Draw image1
[image1 drawInRect:CGRectMake(0, 0, 40, 40)];
// Draw image2
[image2 drawInRect:CGRectMake(40, 0, 40, 40)];
// Draw image2
[image2 drawInRect:CGRectMake(00, 40, 80, 40)];
UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resultingImage;
}
标签:
原文地址:http://www.cnblogs.com/lihaibo-Leao/p/5552213.html