iOS——截屏

+(UIImage *)snapshot:(UIView *)viewit

{io

    UIGraphicsBeginImageContextWithOptions(view.bounds.size,YES,0);date

    

    [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];im

    

    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();view

    

    UIGraphicsEndImageContext();vi

    

    return image;return

}ps

相關文章
相關標籤/搜索