EDIT: Ok i decided to save the array in the userDefaults... should be easy, right ? Save:
NSUserDefaults *userDefs = [NSUserDefaults standardUserDefaults];
[userDefs setObject:videoArray forKey:@"dataArray"];
[userDefs synchronize];
Load:
NSUserDefaults *userDefs = [NSUserDefaults standardUserDefaults];
videoArray = [[NSUserDefaults standardUserDefaults] mutableArrayValueForKey:@"dataArray"];
[tableview reloadData];
NSLog(@"%@",videoArray);
Class of the objects which are in the array:
@interface DEVideoModel : NSObject
@property (copy) NSString *name;
@property (copy) NSImage *thumbnail;
@property (copy) NSDictionary *qualities;
@property (readwrite) float videoSize;
@property (readwrite) float progress;
@property (copy) NSString *filePath;
@property (copy) NSDate *datum;
@end
@synthesize name,filePath,videoSize,qualities,thumbnail,datum,progress;
-(id)init {
self = [super init];
if(self) {
qualities = [[NSDictionary alloc]init];
thumbnail = [[NSImage alloc]init];
}
return self;
}
@end
And my videoArray is (null) when i load it ?! I don't get it. videoArray is a NSMutableArray not NSArray by the way.