YYModel icon indicating copy to clipboard operation
YYModel copied to clipboard

使用Archiver crash

Open billLiao opened this issue 9 years ago • 1 comments

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -decodeObjectForKey: only defined for abstract class.  Define -[NSKeyedArchiver decodeObjectForKey:]!'

代码是:

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    return [self yy_modelInitWithCoder:aDecoder];
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [self yy_modelInitWithCoder:aCoder];
}

billLiao avatar Oct 31 '16 06:10 billLiao

直接复制作者给的5个方法即可

SimonHolmeslm avatar Sep 28 '18 03:09 SimonHolmeslm