Latest 0.1.0
Homepage https://git.oschina.net/6253175234/LYJArchiveModel
License MIT
Platforms ios 7.0
Authors

Latest podspec

{
    "name": "LYJArchiveModel",
    "version": "0.1.0",
    "summary": "u5e94u7528u4e8eu6a21u578bu5febu901fu5f52u6863u8f6cu5316u4e3aNSDatau7c7bu578b",
    "description": "1: u521bu5efau4e00u4e2au7ee7u627fLYJArchiveModelu7684u7c7bUserModel,UserModelu653eu5165u6211u4eecu7684u4f7fu7528u7684u5c5eu6027(u652fu6301u7684u683cu5f0fNSString, NSInteger, double, NSDictionary, NSArray, NSMutableDictionary, NSMutableArray, CGFloat, NSData, u7ee7u627fLYJArchiveModelu7684u7c7b , UIImage)n2: u5728 UserModel u521bu5efau4f60u81eau5df1u4f7fu7528u5230u7684u5c5eu6027n   u4f8bu5982:n    #import "ArciveModel.h"nn    @class SubUserModel , UIImage;n    @interface UserModel : ArciveModelnn    @property (nonatomic , copy) NSString *name;n    @property (nonatomic , assign) BOOL isFirstLogin;n    @property (nonatomic , assign) NSInteger age;n    @property (nonatomic , assign) double height;n    @property (nonatomic , strong) NSDictionary *dic;n    @property (nonatomic , strong) NSArray *arr;n    @property (nonatomic , strong) SubUserModel *subUserModel; // u7ee7u627fLYJArchiveModelu7684u5b50u7c7bn    @property (nonatomic , strong) UIImage *userImage;n    @endn3: u4f7fu7528u65b9u6cd5n   u5f15u5165u5934u6587u4ef6: #import nn    UserModel *model = [UserModel new];n    model.name = @"u4f60u597d";n    model.isFirstLogin = YES;n    model.age = 18;n    model.height = 181.5;n    model.dic = @{@"1" : @"2"};n    model.arr = @[@"4" , @"5"];n    model.userImage = [UIImage imageNamed:@"123"];n    model.subUserModel = [SubUserModel new];n    model.subUserModel.name = @"u4f60u6d6au5f00";n    model.subUserModel.age = 20;n    model.subUserModel.isFirstLogin = YES;n    model.subUserModel.height = 170.1;nn    // u5982u679cu5f52u6863u65f6u95f4u8f83u957f,u8fd9u91ccu5f00u542fu52a0u8f7du52a8u753bn    if ([UserModel archive:model keyName:@"li"]) { // u8fd9u91ccu5f00u59cbu5f52u6863u5e76u5b58u50a8u5230u672cu5730,u5982u679cu5b58u50a8u6210u529fu7ee7u7eedu5f80u4e0bu6267u884c,u8fd9u91ccnn        model = nil; // u8fd9u91ccu7f6eu7a7a,u4e3au4e86u6f14u793au4f7fu7528n        // u50a8u5b58u5b8cu6210u540en        // u8fd9u91ccu5173u95edu52a0u8f7du52a8u753bn    }nn    NSLog(@"Model name is %@" , model.name);nn    UserModel *newModel = [UserModel unarchiveWithKeyName:@"li"]; // u53d6u51fau672cu5730u5b58u50a8u7684u6570u636e,u5e76u8fdbu884cu89e3u6863n    if (newModel.isFirstLogin) {nn        NSLog(@"model.name is %@" , newModel.name);n        NSLog(@"%ld", newModel.age);n        NSLog(@"%.2f" , newModel.height);n        NSLog(@"dic is %@" , newModel.dic);n        self.photoImageView.image = newModel.userImage;nn    if (newModel.subUserModel.isFirstLogin) {nn        NSLog(@"Info of subUserModel is %@ , %ld , %.2f" , newModel.subUserModel.name , newModel.subUserModel.age , newModel.subUserModel.height);n    }nnu8f93u51fau7ed3u679c:n Model name is (null)n model.name is u4f60u597dn 18n 181.50n dic is {n1 = 2;n}nInfo of subUserModel is u4f60u6d6au5f00 , 20 , 170.10",
    "homepage": "https://git.oschina.net/6253175234/LYJArchiveModel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "li625317534": "[email protected]"
    },
    "source": {
        "git": "https://git.oschina.net/6253175234/LYJArchiveModel.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "LYJArchiveModel/Classes/**/*"
}

Pin It on Pinterest

Share This