I've seen a number of posts on UIGetScreenImage, however, not a complete working (short) code example.
If anyone has a code example, from the prototype definition to an actual call, that would be greatly appreciated.
Thanks
John
I've seen a number of posts on UIGetScreenImage, however, not a complete working (short) code example.
If anyone has a code example, from the prototype definition to an actual call, that would be greatly appreciated.
Thanks
John
CGImageRef UIGetScreenImage(void);
....
CGImageRef screen = UIGetScreenImage();
UIImage* screenImage = [UIImage imageWithCGImage:screen];
CGImageRelease(screen); // you need to call this.
// UIGetScreenImage violates the CF memory management rules.
// Use screenImage as you like.