iOS开发实用技巧——调用Home+PowerButton实现当前屏幕截屏

使用方法:
1. 声明一个C函数extern "C" CGImageRef UIGetScreenImage();

2. CGImageRef img = UIGetScreenImage();
    UIImage* scImage=[UIImage imageWithCGImage:img];
    UIImageWriteToSavedPhotosAlbum(scImage, nil, nil, nil);

 
原文地址:https://www.cnblogs.com/yshch/p/3160347.html