-(UIImage *)saveImage:(UIView *)view {
CGRect mainRect = [[UIScreen mainScreen] bounds];
UIGraphicsBeginImageContext(CGSizeMake(320, 200));
CGContextRef context = UIGraphicsGetCurrentContext();
// [[UIColor blackColor] set];
CGContextFillRect(context, mainRect);
[view.layer renderInContext:context];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
图片合成截屏
原文:http://www.cnblogs.com/tian-sun/p/5019882.html