Skip to content

对归档的封装,使用方便简单,轻松实现数据本地化。

Notifications You must be signed in to change notification settings

WangPengShuai/Archieve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Archieve

对归档的封装,使用方便简单,轻松实现数据本地化。

@interface ViewController ()
@property (nonatomic, strong) BDLocalModelAgent *agent;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSMutableArray *array = [NSMutableArray new];
    for (int i = 0; i < 10; i ++) {
        Person *p = [[Person alloc] init];
        p.name = [NSString stringWithFormat:@"我是%d",i];
        p.age  = [NSString stringWithFormat:@"年龄%d",i];
        p.area = [NSString stringWithFormat:@"地区%d",i];
        [array addObject:p];
    }
    //缓存
    self.agent = [[BDLocalModelAgent alloc] init];
    self.agent.domain = @"233333";
    [self.agent removeAllInfos];
    [self.agent addInfos:array];
    [self.agent saveInfos];
}

@end

About

对归档的封装,使用方便简单,轻松实现数据本地化。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published