iOS 截屏方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013282507/article/details/53940620
//获取屏幕截屏
- (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;
}

没有更多推荐了,返回首页