-(UIImage *)screenImageWithSize:(CGSize )imgSize{ UIGraphicsBeginImageContext(imgSize);
CGContextRef context = UIGraphicsGetCurrentContext();
AppDelegate * app = (AppDelegate *)[UIApplication sharedApplication].delegate;
[app.window.layer renderInContext:context];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;}
网友评论