Is it possible to save an integer array using NSUserDefaults on the iPhone? I have an array declared in my .h file as: int playfield[9][11] that gets filled wi
You can save and retrieve the array with a NSData wrapper
ie (w/o error handling)
Save
NSData *data = [NSData dataWithBytes:&playfield length:sizeof(playfield)];
[prefs setObject:data forKey:@"slot1Save"];
Load
NSData *data = [prefs objectForKey:@"slot1Save"];
memcpy(&playfield, data.bytes, data.length);