0
//截圖代碼爲什麼我的UIView顯示當我截圖它
/* Capture the screen shoot at native resolution */
UIGraphicsBeginImageContextWithOptions(Grid.frame.size, Grid.opaque, 1.0f);
[Grid.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
/* Render the screen shot at custom resolution */
CGRect cropRect = CGRectMake(0 ,0 , Grid.frame.size.width * 4, Grid.frame.size.height * 4);
UIGraphicsBeginImageContextWithOptions(cropRect.size, Grid.opaque, 1.0f);
[screenshot drawInRect:cropRect];
customScreenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
/* Save to the photo album */
UIImageWriteToSavedPhotosAlbum(customScreenShot,self, @selector(thisImage:hasBeenSavedInPhotoAlbumWithError:usingContextInfo:), NULL);
當過我使用它概述了灰我uiviews而是一個邊界,如果我按住電源和home鍵使用手動截圖同時這些灰色輪廓不會出現。
任何人都可以幫忙嗎?
標題和正文報告有衝突,但無論如何,不會描述所需的行爲,這會使此問題有點混淆。 – nhgrif 2015-02-06 01:22:58