Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UIImage *)snapshotImage {
- IOSurfaceRef surface = [UIWindow createScreenIOSurface];
- UIImageOrientation imageOrientation = UIImageOrientationUp;
- CGRect frame = SCREEN;
- UIImage *img = [[UIImage alloc] initWithCGImage:UICreateCGImageFromIOSurface(surface) scale:[UIScreen mainScreen].scale orientation:imageOrientation];
- CFRelease(surface);
- [img release];
- return img;
- }
Add Comment
Please, Sign In to add comment