Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 560 Bytes

File metadata and controls

28 lines (18 loc) · 560 Bytes

NSCodingHelper

an easy way to use NSCoding ^_^

add two line of code in the .m file ,and run it!

 #import "property.h"
 #import "CXLCodingHelper.h"

@implementation property

- (id)initWithCoder:(NSCoder *)aDecoder {
   self = [super init];
    if (!self) {
       return nil;
   }
   self = [CXLCodingHelper decodeClass:self decoder:aDecoder];
   return self; 
 }


 -(void)encodeWithCoder:(NSCoder *)aCoder {
     [CXLCodingHelper encodeClass:self encoder:aCoder]; 
 }

nothing else ..