iOS 截屏方法
- //获取屏幕截屏
- - (UIImage*)getScreenShotsOfView:(UIView *)view{
- CGSize size = view.frame.size;
- UIGraphicsBeginImageContextWithOptions(size, NO, [UIScreen mainScreen].scale);
- CGContextRef context = UIGraphicsGetCurrentContext();
- [view.layer renderInContext:context];
- UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- return img;
- }