Last active
August 29, 2015 14:28
-
-
Save AmitaiB/b9a716e7b6a6b4b98558 to your computer and use it in GitHub Desktop.
shortens getting a UIImage from the string of a URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIImage (FromURL) | |
+(UIImage*)imageWithContentsOfURLString:(NSString*)URLString; | |
@end | |
//************************************* | |
#import "UIImage+FromURL.h" | |
@implementation UIImage (FromURL) | |
+(UIImage*)imageWithContentsOfURLString:(NSString*)URLString { | |
return [UIImage imageWithCIImage:[CIImage imageWithContentsOfURL:[NSURL URLWithString:URLString]]]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment