I use NSDefaults for saving objects.
I want to save an object which contains properties, that point to another object which inherits from NSObject and contains properties like NSString and etc...
How can I do it?
Example:
#import <Foundation/Foundation.h>
#import "user.h"
@interface dataManager : NSObject
@property (strong,nonatomic)user* user;
@end
@interface user : NSObject
@property (copy,nonatomic) NSString* userName;
@property (assign,nonatomic)int age;
@end
I want to save dataManager to NSDefaults and it's properties as well (regardless the number of them).