[[NSUserDefaults standardUserDefaults] setObject:myArray forKey:@"myArray"];
I’m trying to figure out how to save and load an array using NSUser Defaults. I already have the NSCoding delegate methods defined, just need to know the actual commands to execute that will call those methods.
The posted code stores the array:
-setObject:forKey:/-setBool:forKey:/… store a value-objectForKey:/-boolForKey:/… retrieve a valueIn your case you’ll want to store it using
-setObject:forKey:and retrieve it using-arrayForKey:.