Reputation: 89
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);
Upvotes: 0
Views: 534
Reputation: 1702
Its not permitted by Apple. there are possibilities of it if phone is jailbroken.
Upvotes: 0
Reputation: 119242
You can't take an image of the home screen from within your app. This would violate the sandbox principle.
Upvotes: 1