Created
April 25, 2013 15:32
-
-
Save nickjshearer/5460647 to your computer and use it in GitHub Desktop.
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
@implementation Article | |
- (id)initWithDictionary:(NSDictionary *)dictionary { | |
self = [self init]; | |
if (self != nil) { | |
self.title = jsonObject[@"title"]; | |
self.body = jsonObject[@"body"]; | |
self.url = [NSURL URLWithString:jsonObject[@"url"]]; | |
self.dateModified = [self.dateFormatter dateFromString:jsonObject[@"modified"]]; | |
// etc etc etc | |
} | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment