title: IOS UICollectionView Register nib for UICollectionViewCell not working
body: <p>here's my code : </p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
     ...
      UICollectionViewFlowLayout *layout=[[UICollectionViewFlowLayout alloc] init];
      [layout setItemSize:CGSizeMake(160, 160)];
      [layout setMinimumInteritemSpacing:5.f];
      [layout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
  
      _photoPicker = [[UICollectionView alloc] initWithFrame:CGRectMake(10, 10 , self.view.frame.size.width - 20, 160 ) collectionViewLayout:layout];
      [_photoPicker registerNib:[UINib nibWithNibName:@"photoUploadCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@" photoUploadCell"];
  
      //[_photoPicker registerClass:[photoUploadCollectionViewCell class] forCellWithReuseIdentifier:@"photoUploadCell"];
      _photoPicker.backgroundColor = gray;
      _photoPicker.delegate = self;
      _photoPicker.dataSource = self;
      [self.scrollView addSubview:_photoPicker];
  
  }
  -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
      photoUploadCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"photoUploadCell" forIndexPath:indexPath];
  
  }
  </code></pre>
  
  <p>This code crash at <code>photoUploadCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"photoCell" forIndexPath:indexPath];</code> and I get this error :  </p>
  
  <blockquote>
    <p>2015-05-26 10:45:29.363 Free Sale[4505:55482] <strong>* Assertion failure in
    -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /SourceCache/UIKit_Sim/UIKit-3347.44/UICollectionView.m:3454
    2015-05-26 10:45:29.374 Free Sale[4505:55482] *</strong> Terminating app due
    to uncaught exception 'NSInternalInconsistencyException', reason:
    'could not dequeue a view of kind: UICollectionElementKindCell with
    identifier photoCell - must register a nib or a class for the
    identifier or connect a prototype cell in a storyboard'
    *** First throw call stack:</p>
  </blockquote>
  
  <p>Any one know this wired issue ? </p>