What is the best way to store an MKCoordinateRegion using core data? I assume there is a way to convert this to binary data somehow??
Many thanks
Jules
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This works in any iOS version, for any struct, with Core Data, NSUserDefaults, or NSKeyedArchiver. It is portable between any system running on the same architecture (all iOS versions run on little-endian 32 bit).
If you use this for archiving, an alternative is subclassing NSCoder or create a NSCoder category.