ios 截屏
把当前屏幕作为获取成为图片
- (UIImage *)rn_screenshot {
UIGraphicsBeginImageContext(self.bounds.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *imageData = UIImageJPEGRepresentation(image, 0.75);
image = [UIImage imageWithData:imageData];
return image;
}