有没有办法在没有背景图像的情况下拍摄我的应用程序的屏幕截图?

时间:2014-12-16 20:27:17

标签: ios xcode6 screenshot

我有一个应用程序,我创建了一个按钮,将应用程序截图到相机胶卷。我希望能够在用户进行屏幕截图时隐藏背景图像。

-(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。

0 个答案:

没有答案