views:

69

answers:

1

I was able to save an NSMutableArray of custom objects to NSUserDefaults by implementing NSCoding in the custom class. However, now I want to save an NSMutableArray of these arrays. The compiler complains when I try to do this. How can this be done?

A: 

I found out how to do it. Basically, your transform the array into a data object using NSKeyedArchiver, and that is what you save with NSUserDefaults. Then when you get the data object back, you use NSKeyedUnarchiver to turn it back into an array.

awakeFromNib