Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #886 from themil/patch-1

Update iOS/Screenshot/Screenshot.m
  • Loading branch information...
commit f60bac641b8d5b2b0fe69e637282202ed765e512 2 parents 3611f3b + d3037b4
@devgeeks devgeeks authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 iOS/Screenshot/Screenshot.m
View
7 iOS/Screenshot/Screenshot.m
@@ -31,7 +31,12 @@ - (void)saveScreenshot:(NSArray*)arguments withDict:(NSDictionary*)options
imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect), CGRectGetHeight(screenRect));
}
- UIGraphicsBeginImageContext(imageRect.size);
+ // Adds support for Retina Display. Code reverts back to original if iOs 4 not detected.
+ if (NULL != UIGraphicsBeginImageContextWithOptions)
+ UIGraphicsBeginImageContextWithOptions(imageRect.size, NO, 0);
+ else
+ UIGraphicsBeginImageContext(imageRect.size);
+
CGContextRef ctx = UIGraphicsGetCurrentContext();
[[UIColor blackColor] set];
Please sign in to comment.
Something went wrong with that request. Please try again.