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;
}

 
 
上一篇:ubuntu实现ramdisk


下一篇:[HeadFirst-JSPServlet学习笔记][第二章:高层概述]