Created
April 16, 2016 13:23
-
-
Save snosrap/c0e09a8694d5e3fc3e566b1b326b5d7a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (HKQueryAnchor *)anchor { | |
return [NSKeyedUnarchiver unarchiveTopLevelObjectWithData:[NSUserDefaults.standardUserDefaults dataForKey:@"anchor"] error:nil]; | |
} | |
- (void)setAnchor:(HKQueryAnchor *)value { | |
[NSUserDefaults.standardUserDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:value] forKey:@"anchor"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment