发布网友 发布时间:2022-04-02 13:25
共1个回答
热心网友 时间:2022-04-02 14:54
解决方法很多!//屏幕截图UIImage*snapshot;CGImageRefcgScreen=UIGetScreenImage();if(cgScreen){snapshot=[UIImageimageWithCGImage:cgScreen];CGImageRelease(cgScreen);}CGRectrect=CGRectMake(0,125,0,750);//创建要剪切的矩形框这里你可以自己修改UIImage*res=[UIImageimageWithCGImage:CGImageCreateWithImageInRect([snapshotCGImage],rect)]//res就是截图后的UIImage