ifish/Ifish/models/ifishUserModel/IfishNewsModel.m

44 lines
810 B
Objective-C

//
// 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