Created
March 20, 2015 12:35
-
-
Save vendruscolo/e0904f9054e0d42f29c2 to your computer and use it in GitHub Desktop.
Workaround for http://openradar.appspot.com/20224363
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
- (instancetype)initWithCoder:(NSCoder *)coder { | |
if ((self = [self init])) { | |
NSDictionary *pointValue = [coder decodeObjectForKey:@"point"]; | |
CGPointMakeWithDictionaryRepresentation((__bridge CFDictionaryRef)pointValue, &_point); | |
_number = [coder decodeDoubleForKey:@"number"]; | |
} | |
return self; | |
} | |
- (void)encodeWithCoder:(NSCoder *)coder { | |
CFDictionaryRef pointValue = CGPointCreateDictionaryRepresentation(self.point); | |
[coder encodeObject:(__bridge NSDictionary *)(pointValue) forKey:@"point"]; | |
[coder encodeDouble:self.number forKey:@"number"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment