3
我试图采取2 - 3视图的iPad屏幕快照。 我可以做到这一点。转换屏幕快照
现在什么我的问题是,当我在横向模式M,我只是transformrotate一个视图与
CGAffineTransform transform;
transform = CGAffineTransformMakeRotation(M_PI/2);
imgPlayBoard.transform = transform;
现在,当我走快照,然后在图像视图图像出现肖像。 发生了什么我无法得到它。我正在使用以下功能拍摄快照。
-(UIImage *)saveImage{
UIGraphicsBeginImageContext(imgPlayBoard.frame.size);
[imgPlayBoard.layer renderInContext:UIGraphicsGetCurrentContext()];
[imagesView.layer renderInContext:UIGraphicsGetCurrentContext()];
[drawBoard.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIImageWriteToSavedPhotosAlbum(resultingImage, nil, nil, nil);
UIGraphicsEndImageContext();
return resultingImage;
}
这是我得到的图像。快照中的图像大小相同,但所有ape都是白色。
检查,如果这有助于http://stackoverflow.com/questions/2831576/iphone-ipad-application-taking-screen-shot –
@AnkitSrivastava不全的观点是旋转,只有绿色背景旋转。这样,它不工作 – DivineDesert