title: iOS: assigning a class to a xib, and not recognizing it
body: <p>I'm using the following code to load a xib in my UIView subclass named ImageWithCaptionView.
  I've specified in the xib Inspector the name of the view: ImageWithCaptionView.</p>
  
  <p>However the if statement (isKindOfClass) is never true, and I've to remove it to make things work. What am I missing here ? </p>
  
  <pre><code>    UINib *nib = [[UINib nibWithNibName:NSStringFromClass([ImageWithCaptionView class]) bundle:nil] retain];
  
      NSArray *myArray = [nib instantiateWithOwner:self options:nil];  
  
       for (id currentObject in myArray) {
           if ([currentObject isKindOfClass:[ImageWithCaptionView class]]) {
               self = (ImageWithCaptionView *) currentObject;
               break;
          }
       }
  </code></pre>