This will load an array
- (id)initWithCoder:(NSCoder*) coder
{
self = [super initWithCoder: coder];
if (self) {
myArray=[coder decodeObjectForKey:@"myArray"];
}
return self;
}
What is the code that will call this function so that the array can be loaded?
The initWithCoder:
methods are used for deserializing using NSCoding protocol, e.g. via [NSKeyedUnarchiver unarchiveObjectWithFile:]. For details see the Archives and Serializations Programming Guide, especially the Encoding and Decoding Objects section.