title: UICollectionViewCell subclass init never run
body: <p>I have added a collection view in viewDidLoad like this...</p>
  
  <pre><code>self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 10, 10) collectionViewLayout:flowLayout];
  self.collectionView.delegate = self;
  self.collectionView.dataSource = self;
  self.collectionView.backgroundColor = [UIColor whiteColor];
  [self.collectionView registerClass:[CameraCell class] forCellWithReuseIdentifier:CameraCellReuseIdentifier];
  [self.collectionView setTranslatesAutoresizingMaskIntoConstraints:NO];
  [self.view addSubview:self.collectionView];
  </code></pre>
  
  <p>And I have a UICollectionViewCell subclass called CameraCell with an init like this...</p>
  
  <pre><code>- (id)init
  {
      self = [super init];
      if (self) {
          // Add customisation here...
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(imageChanged:) name:@"image" object:nil];
  
          self.contentView.backgroundColor = [UIColor yellowColor];
  
          self.imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
          self.imageView.contentMode = UIViewContentModeScaleAspectFill;
          self.imageView.clipsToBounds = YES;
          [self.imageView setTranslatesAutoresizingMaskIntoConstraints:NO];
          [self.contentView addSubview:self.imageView];
  
          NSDictionary *views = NSDictionaryOfVariableBindings(_imageView);
  
          [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_imageView]|"
                                                                                   options:0
                                                                                   metrics:nil
                                                                                     views:views]];
  
          [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|[_imageView]|"
                                                                                   options:0
                                                                                   metrics:nil
                                                                                     views:views]];
      }
      return self;
  }
  </code></pre>
  
  <p>But when I run the app the collection view is there and I can scroll it but I can't see any cells. I have added a breakpoint in the cell's init and it never gets called. Is there another method I have to override?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>When I log the cell in cellForItemAtIndexPath...</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      CameraCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CameraCellReuseIdentifier forIndexPath:indexPath];
  
      NSLog(@"%@", cell);
  
      return cell;
  }
  </code></pre>
  
  <p>It displays the correct class...</p>
  
  <pre><code>&lt;CameraCell: 0x1f07ba30; baseClass = UICollectionViewCell; frame = (0 20; 320 280); layer = &lt;CALayer: 0x1f07bb40&gt;&gt; 
  </code></pre>