Best way to save to nsuserdefaults for custom class?

Posted by cannyboy on Stack Overflow See other posts from Stack Overflow or by cannyboy
Published on 2010-06-08T18:37:12Z Indexed on 2010/06/08 19:02 UTC
Read the original article Hit count: 155

If I have a custom class Person which has three variables (which are propertized and synthesized):

NSString* theName;
float* theHeight;
int theAge;

Person instances are stored in an NSArray 'Group'. There is only one Group. What is the best way of string and loading the Group in NSUserDefaults? (bearing in mind that float and int are not legal for NSUserDefaults)

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c