Skip to content

Instantly share code, notes, and snippets.

@Eluss
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eluss/565c38f567ab5482202b to your computer and use it in GitHub Desktop.
Save Eluss/565c38f567ab5482202b to your computer and use it in GitHub Desktop.
- (void)loadTasks {
NSString *path = @"~/Documents/";
path = [path stringByAppendingString:@"FILE_NAME"];
path = [path stringByExpandingTildeInPath];
NSMutableDictionary *rootObject = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
NSArray *tasks = rootObject[@"myTasks"];
for (NSInteger i = 0; i < tasks.count; i++) {
Task *task = tasks[i];
NSLog(@"Loaded task:%@", task.name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment