我的本地化关于NSDefaults

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

[defaults setObject:@"abc" forKey:@"data"];

[defaults synchronize];//记得要写入磁盘文件哦

NSString *testStr = [defaults objectForKey:@"data"];

NSLog(@"testStr is: %@",testStr);

你可能感兴趣的:(职场,NSUserDefaults,休闲)