Save list of CGPoints using NSUserDefaults
Posted
by
Chris Daviduik
on Stack Overflow
See other posts from Stack Overflow
or by Chris Daviduik
Published on 2011-01-01T21:46:20Z
Indexed on
2011/01/01
21:54 UTC
Read the original article
Hit count: 286
I have a bunch of CGPoints from a CCTMXLayer I want to save to NSUserDefaults but cannot seem to figure out an elegant way of doing so.
Originally I was hoping to save an NSDictionary with an NSMutableSet for a value containing several NSValues (valueWithCGPoint). From what I can tell neither NSMutableSet or NSValue is supported by NSUserDefaults.
At this point I am considering saving the x&y values of the CGPoint as a string and just converting it back and forth as needed.
© Stack Overflow or respective owner