Permalink
Browse files

- removed screenshot method that is not used

  • Loading branch information...
honcheng committed Sep 15, 2012
1 parent 94db46c commit 8fe435603b81b12cda36ca1aedb367a1716965d9
@@ -38,5 +38,4 @@ typedef void (^CompletionBlock)(UIImage *image);
@interface UIView (Screenshot)
- (UIImage*)screenshot;
-- (void)takeScreenshot:(CompletionBlock)block;
@end
@@ -68,22 +68,4 @@ - (UIImage*)screenshot
return screenshot;
}
-- (void)takeScreenshot:(CompletionBlock)block
-{
- dispatch_queue_t queue = dispatch_queue_create("screenshot", 0);
- dispatch_async(queue, ^(void) {
-
- UIGraphicsBeginImageContextWithOptions(self.frame.size, NO, 0.0);
- [self.layer renderInContext:UIGraphicsGetCurrentContext()];
-
- UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
-
- dispatch_async(dispatch_get_main_queue(), ^{
- block(screenshot);
- });
- dispatch_release(queue);
- });
-}
-
@end

0 comments on commit 8fe4356

Please sign in to comment.