Last active
August 29, 2015 14:25
-
-
Save Eluss/565c38f567ab5482202b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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