Method to load file implemented, not accessible by app yet
This commit is contained in:
parent
ad1381d5df
commit
3bc298e6cb
@ -52,4 +52,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadSave:(NSString *)file {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
|
||||
NSUserDomainMask, YES);
|
||||
NSString *documentsPath = [paths objectAtIndex:0];
|
||||
NSString *filePath = [documentsPath
|
||||
stringByAppendingString:[NSString stringWithFormat:@"/%@", file]];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
|
||||
_save = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user