我有一个应用程序,我创建了一个按钮,将应用程序截图到相机胶卷。我希望能够在用户进行屏幕截图时隐藏背景图像。
-(IBAction) screenShot: (id) sender{
UIGraphicsBeginImageContext(sshot.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage,nil, nil, nil);
}
我将此作为我的背景
[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"back5.png"]]];
是否有可能拍摄应用程序的屏幕截图,其中背景不再是图像而只是白色?我也想在使用屏幕截图时隐藏image.view。