title: cocoa - unarchivedObjectOfClass does not call initWithCoder
body: <p>I am developing a macOS app using objective-C.</p>
  
  <p>I tried to save a NSArray object in Core Data. I write</p>
  
  <pre><code>- (id)reverseTransformedValue:(id)value
  {
    return [NSKeyedUnarchiver unarchivedObjectOfClass:[NSArray class] fromData:value error:nil];
  }
  </code></pre>
  
  <p>in the class that inherits NSValueTransformer.</p>
  
  <p>And one of elements in my NSArray object is not of primary kind(which has properties called courseName and courseInfos), so I conform  in this element's class. In this class ,I write:</p>
  
  <pre><code>- (id)initWithCoder:(NSCoder *)aDecoder
  {
      self = [[self class] new];
      if (self = [super init])
      {
           self.courseName = [aDecoder decodeObjectForKey:@"courseName"];
           self.courseInfos = [aDecoder decodeObjectForKey:@"courseInfos"];
      }
      return self;
  }
  </code></pre>
  
  <p>When my apps runs, the reverseTransformedValue: method is called, and all elements but that special nonprimary element in my NSArray object are decoded. I put a breakpoint in the initWithCoder: method in that special element's class, and it never runs. I use some tools and find that element is successfully stored in my core data, so its encoding process has no problem.</p>