Created
March 26, 2013 20:58
-
-
Save filipecrosk/5249188 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
marcas.h | |
@interface marcas : NSObject<NSCoding> { | |
NSString *marca; | |
NSString *idMarca; | |
} | |
@property(nonatomic, retain) NSString *marca; | |
@property(nonatomic, retain) NSString *idMarca; | |
@end | |
------------------------------------ | |
marcas.m | |
- (id)initWithCoder:(NSCoder *)decoder { | |
if (self = [super init]) { | |
self.marca = [decoder decodeObjectForKey:@"marca"]; | |
self.idMarca = [decoder decodeObjectForKey:@"idMarca"]; | |
} | |
return self; | |
} | |
- (void)encodeWithCoder:(NSCoder *)encoder { | |
[encoder encodeObject:marca forKey:@"marca"]; | |
[encoder encodeObject:idMarca forKey:@"idMarca"]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment