iphone程序中实现截屏的一种方法
//导入头文件#import QuartzCore/QuartzCore.h//将整个self.view大小的图层形式创建一张图片image UIGraphicsBeginImageContext(self.view.bounds.size);[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];UIImage*image=UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();//然后将该图片保存到图片图UIImageWriteToSavedPhotosAlbum(image,self,nil,nil);