Reputation: 2714
I have one costum object which has a reference to another custom object.
How do I encode the custom object within the one custom object in my - (void)encodeWithCoder:(NSCoder *)encoder
method?
Lets say name is a string an cObj is another custom obj:
- (void)encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:self.name forKey:@"name"];
[encoder encodeObject:self.cObj forKey:@"cObj"];
}
Does this will call - (void)encodeWithCoder:(NSCoder *)encoder
in my other custom object?
Thank you.
Upvotes: 1
Views: 865