Skip to content

Instantly share code, notes, and snippets.

@patzearfoss
Created April 23, 2014 16:03
Show Gist options
  • Save patzearfoss/11221387 to your computer and use it in GitHub Desktop.
Save patzearfoss/11221387 to your computer and use it in GitHub Desktop.
#import "CBKClassToChange.h"
@implementation CBKClassToChange
+ (void)load
{
[NSKeyedUnarchiver setClass:self forClassName:@"CBClassToChange"];
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:self.name forKey:@"name"];
[aCoder encodeObject:self.value forKey:@"value"];
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
if (self)
{
self.name = [aDecoder decodeObjectForKey:@"name"];
self.value = [aDecoder decodeObjectForKey:@"value"];
}
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment