0
我想要在iOS上獲得UIView屏幕捕獲。iOS使用UIImageView捕獲UIView裏面
在我看來,我有兩個UIImageView動畫。
,我使用它來捕捉視野中的代碼是:
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 1.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
// Read the UIImage object
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(image, self,
@selector(image:didFinishSavingWithError:contextInfo:), nil);
結果是與背景的圖像和僅一個的UIImageView。兩個ImageView都一直在移動。如果我拍了幾張照片,那麼UIImageView每次都處於相同的位置。
使用self.view.layer.presentationLayer使用下面的行 – Till 2013-03-06 17:42:27