我将如何执行此操作我尝试将浮动数据存储在自己的数组中,然后在检索它们时将它们分配给单独的数组。什么会比NSuserdefualts
更好 for (int i=0; i<10; i++) {
NSString *keys = [NSString stringWithFormat:@"key%d", i];
NSObject * object = [prefs objectForKey:keys];
if(object != nil){
NSLog(@"There is a a saved value for %@", keys);
}else{
[[NSUserDefaults standardUserDefaults] setObject:coords forKey:keys];
NSLog(@"Saved value %f , %f ... in slot %@",key1, key2 ,keys);
break;
}
}