Skip to content

Instantly share code, notes, and snippets.

@jmont
Created February 14, 2014 15:43
Show Gist options
  • Save jmont/9003277 to your computer and use it in GitHub Desktop.
Save jmont/9003277 to your computer and use it in GitHub Desktop.
NSCoding mock implementation
- (id)xxx_decoder:(NSCoder *)decoder decodeObjectOfClass:(Class)class forKey:(id)key {
id obj = [decoder decodeObjectForKey:key];
if (![obj isKindOfClass:class]) {
return nil;
}
return obj;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment