Guest User

Untitled

a guest
Sep 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. - (UIImage *)snapshotImage {
  2. IOSurfaceRef surface = [UIWindow createScreenIOSurface];
  3. UIImageOrientation imageOrientation = UIImageOrientationUp;
  4. CGRect frame = SCREEN;
  5. UIImage *img = [[UIImage alloc] initWithCGImage:UICreateCGImageFromIOSurface(surface) scale:[UIScreen mainScreen].scale orientation:imageOrientation];
  6. CFRelease(surface);
  7. [img release];
  8. return img;
  9. }
Add Comment
Please, Sign In to add comment