title: Loading custom UIView from nib, all subviews contained in nib are nil?
body: <p>I have a custom <code>UIView</code> object with a <code>nib</code> that defines the view/subview layout.  My outlets are connected, and when I init the object from <code>initWithFrame:</code> everything is in order.</p>
  
  <p>The problem I'm having is when I'm using IB to embed the <code>UIView</code> into another nib; the custom <code>UIView</code> appears, but none of the subviews it contains appear - in fact their symbols all resolve to nil.  I have a very minimal <code>initWithCoder:</code> and <code>awakeFromNib:</code> implementation (just does logging) and my understanding is that as the nib is deserialized the subviews should at least be initialized during the process?</p>
  
  <p>The only conclusion I'm coming to on my own is that one of two things is happening:  either my outlet references are corrupt/bad and aren't working, or my understanding of load-from-nib process is faulty and I'm missing something.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: (Code posted for Nekto as requested... as you'll see, it does logging and thats it, heh.)</p>
  
  <pre><code>- (id)initWithCoder:(NSCoder *)aDecoder {
      if ((self = [super initWithCoder:aDecoder])) {
          NSLog(@"ThumbnailGridView.initWithCoder frame= %f, %f", self.frame.size.width, self.frame.size.height);
      }
      return self;
  }
  
  - (void)awakeFromNib
  {
      NSLog(@"ThumbnailGridView:awakeFromNib");
  }
  </code></pre>
  
  <p>Edit 2: Nibs, controllers, subviews, etc.</p>
  
  <p>Nibs:  I have a single nib containing a UIView.  This UIView contains a single UIScrollView, which is filled with a grid of UIViews that are defined in another nib.  (Note: this part works fine, as the fill is done programmatically and works with an initWithFrame: call.)  The problem here is that the UIScrollView symbol is nil after initWithCoder: and awakeFromNib: are both called, so objects are just being added to nil and nothing happens.  If the scrollview symbol was not nil, I'm sure this would work.</p>
  
  <p>Controllers:  There are two controllers that utilize this, one is done with initWithFrame: and works perfectly, the other embeds it as a nib-based reference.  (As mentioned elsewhere here, defining a UIView in IB, setting the custom class.)  I stepped through the code, and that view -is- being initialized properly - only its subviews are "missing".</p>
  
  <p>Does this help give a clearer picture of the situation at all?</p>