Created
July 24, 2015 09:45
-
-
Save Eluss/0ee3bc08b6805c36c61d 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 Task | |
- (instancetype)initWithName:(NSString *)name { | |
self = [super init]; | |
if (self) { | |
self.name = name; | |
} | |
return self; | |
} | |
- (void)encodeWithCoder:(NSCoder *)coder { | |
if (self.name != nil) { | |
[coder encodeObject:self.name forKey:@"name"]; | |
} | |
} | |
- (id)initWithCoder:(NSCoder *)coder { | |
self = [super init]; | |
if (self != nil) { | |
self.name = [coder decodeObjectForKey:@"name"]; | |
} | |
return self; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment