Capturing full screenshot with status bar in iOS programmatically
问题 I am using this code to capture a screenshot and to save it to the photo album. -(void)TakeScreenshotAndSaveToPhotoAlbum { UIWindow *window = [UIApplication sharedApplication].keyWindow; if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) UIGraphicsBeginImageContextWithOptions(window.bounds.size, NO, [UIScreen mainScreen].scale); else UIGraphicsBeginImageContext(window.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image =