How do I archive an array of NSValues ? What conversions should I make to do this? It won't archive it as is.
Code:
[[NSUserDefaults standardUserDefaults] setObject:[NSKeyedArchiver
archivedDataWithRootObject:[[NSArray alloc] initWithArray:drawingsArray]]
forKey:@"NSValuesArray"];
Error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver cannot encode structs'
Array Data:
drawingsArray (
(
NSPoint: {439, 280},
NSPoint: {439, 280},
NSPoint: {439, 287},
NSPoint: {438.62, 290.104},
NSPoint: {439, 293}
)
)