What is the best way to save an NSMutableArray to NSUserDefaults?
问题 I have a custom object called Occasion defined as follows: #import <Foundation/Foundation.h> @interface Occasion : NSObject { NSString *_title; NSDate *_date; NSString *_imagePath; } @property (nonatomic, retain) NSString *title; @property (nonatomic, retain) NSDate *date; @property (nonatomic, retain) NSString *imagePath; Now I have an NSMutableArray of Occasions which I want to save to NSUserDefaults. I know it's not possible in a straight forward fashion so I'm wondering which is the