截屏的步骤

截屏的方法首先加入头文件#import QuartzCore/QuartzCore.h,并载入QuartzCore.framework库。?UIGraphicsB

截屏的方法

首先加入头文件#import <QuartzCore/QuartzCore.h>,并载入QuartzCore.framework库。

?

UIGraphicsBeginImageContext(self.view.bounds.size);[self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image= UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);

?