简体   繁体   中英

How to take Screen Shot of iPad Home screen programatically?

i tried below code but it take only apps background screenshot, not iPad home screenshot...

CGImageRef screen = UIGetScreenImage();
UIImage* image = [UIImage imageWithCGImage:screen];
CGImageRelease(screen);
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);

You can't take an image of the home screen from within your app. This would violate the sandbox principle.

Its not permitted by Apple. there are possibilities of it if phone is jailbroken.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM