Initial commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// IfishNewsModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/11/3.
|
||||
// Copyright © 2016年 lianxiang. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishNewsModel.h"
|
||||
|
||||
@implementation IfishNewsModel
|
||||
-(void)encodeWithCoder:(NSCoder*)aCoder
|
||||
{
|
||||
[aCoder encodeObject:self forKey:@"infoId"];
|
||||
[aCoder encodeObject:self forKey:@"title"];
|
||||
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder*)aDecoder{
|
||||
|
||||
if (self=[super init]) {
|
||||
|
||||
self.infoId = [aDecoder decodeObjectForKey:@"infoId"];
|
||||
self.title = [aDecoder decodeObjectForKey:@"title"];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(instancetype)initWithDict:(NSDictionary *)dict
|
||||
{
|
||||
|
||||
if (self = [super init]) {
|
||||
|
||||
self.infoId = [dict objectForKey:@"infoId"];
|
||||
self.title = [dict objectForKey:@"title"];
|
||||
}
|
||||
return self;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user