title: UICollectionViewController not validly loading from NIB
body: <p>iOS 6.0, testing on an iPhone 5</p>
  
  <p>I am loading a subclass of <code>UICollectionViewController</code> from a nib.
  When I hot the <code>awakeFromNib</code> method, it claims that the view is loaded.
  Calling <code>collectionView</code> returns <code>nil</code>.</p>
  
  <p>I'm therefore having a problem registering the nib which to load my cells from.</p>
  
  <pre><code>- (void)awakeFromNib {
    if ([self isViewLoaded])
      NSLog(@"[%@ %@] registered with %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd),
            self.collectionView);
  
    UINib *nib = [UINib nibWithNibName:@"MyCollectionCell" bundle:nil];
    [self.collectionView registerNib:nib forCellWithReuseIdentifier:NIB_ID];
  }
  </code></pre>
  
  <p>Output from above:</p>
  
  <pre><code>2012-09-22 19:21:49.129 myApp[7182:907] [MyCollectionViewController awakeFromNib] registered with (null)
  </code></pre>
  
  <p>Also, <code>loadView</code> and <code>viewDidLoad</code> are not called (expected when loading from a nib).</p>
  
  <p>I fail with exception when trying to load the cells.</p>
  
  <p>Current workaround, redundantly registering nib in <code>collectionView:cellForItemAtIndexPath:</code>:</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    UINib *nib = [UINib nibWithNibName:@"MyCollectionCell" bundle:nil];
    [collectionView registerNib:nib forCellWithReuseIdentifier:NIB_ID];
  </code></pre>
  
  <p><strong>Questions:</strong> Have you run across this?  Do you see the error of my ways?  Is this a known bug?</p>
  
  <hr>
  
  <p><strong>Edit</strong>: additional information …</p>
  
  <p>breaking in awakeFromNib, <code>collectionView</code> appears inaccessible</p>
  
  <pre><code>(lldb) po [self view]
  (UIView *) $1 = 0x1f158400 &lt;UICollectionView: 0x1f158400; frame = (0 0; 320 548); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = &lt;NSArray: 0x1ed8fcf0&gt;; layer = &lt;CALayer: 0x1ed8f790&gt;; contentOffset: {0, 0}&gt; collection view layout: &lt;UICollectionViewFlowLayout: 0x1ed919a0&gt;
  (lldb) po [self collectionView]
  (UICollectionView *) $2 = 0x00000000 &lt;nil&gt;
  </code></pre>
  
  <p>modifying the <code>wakeFromNib</code> to use <code>view</code> instead of <code>collectionView</code> is a better workaround:</p>
  
  <pre><code>  [(UICollectionView *)self.view registerNib:nib forCellWithReuseIdentifier:NIB_ID];
  </code></pre>