diff options
author | Vitaly Takmazov | 2013-11-10 15:56:03 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-11-10 16:02:25 +0400 |
commit | b60aec3598a12a5bf07ad490fa87723e308cd58b (patch) | |
tree | 412c9b1335102219c411f48bc711be58f63846c0 /Juick/UIImage+Helpers.m | |
parent | c7ac059a7e59ff3da4f88c53bedae29655ae900c (diff) |
Images
Diffstat (limited to 'Juick/UIImage+Helpers.m')
-rw-r--r-- | Juick/UIImage+Helpers.m | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Juick/UIImage+Helpers.m b/Juick/UIImage+Helpers.m deleted file mode 100644 index a4ae8e4..0000000 --- a/Juick/UIImage+Helpers.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// UIImage+Helpers.m -// Juick -// -// Created by Vitaly Takmazov on 05.11.13. -// Copyright (c) 2013 com.juick. All rights reserved. -// - -#import "UIImage+Helpers.h" - -@implementation UIImage (Helpers) - -+ (void) loadFromURL: (NSURL*) url callback:(void (^)(UIImage *image))callback { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul); - dispatch_async(queue, ^{ - NSData * imageData = [NSData dataWithContentsOfURL:url]; - dispatch_async(dispatch_get_main_queue(), ^{ - UIImage *image = [UIImage imageWithData:imageData]; - callback(image); - }); - }); -} - -@end |