Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) saveGameState {
- NSNumber *squareData = [NSNumber numberWithInt:*[self.gameManager returnSpotArray]];
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *documentsDirectoryPath = [paths objectAtIndex:0];
- NSString *filePath = [documentsDirectoryPath stringByAppendingPathComponent:@"appData"];
- [NSKeyedArchiver archiveRootObject:squareData toFile:filePath];
- }
Advertisement
Add Comment
Please, Sign In to add comment