NSUserDefaults

存入本地

NSString *string = [NSString stringWithString @“NeiGou"];

NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];

[ud setObject:string forKey:@"myKey”];

取数据

NSString *value;

value = [ud objectForKey:"myKey"];

你可能感兴趣的:(NSUserDefaults)