title: Use a collection view in a popover iOS
body: <p>I want to have a collection view in a popover. So first I set up my Collection view controller and my custom cell. When I start the program from here it works fine.</p>
  
  <p>In another view controller I created a popover controller with the collection view as its content. When I hit a toolbar button, the popover needs to become active.</p>
  
  <p>When I run the simulator I get this error: </p>
  
  <blockquote>
    <p>'could not dequeue a view of kind: UICollectionElementKindCell with
    identifier CameraSystemCell - must register a nib or a class for the
    identifier or connect a prototype cell in a storyboard'</p>
  </blockquote>
  
  <p>Here is my <strong>viewcontroller.m</strong> code:</p>
  
  <pre><code>#import "ViewController.h"
  #import "CameraSystemMenuViewController.h"
  
  @interface ViewController () &lt;UIPopoverControllerDelegate&gt;
  {
      CameraSystemMenuViewController *cameraSystemMenu;
      UIPopoverController *popoverController;
  }
  @end
  
  @implementation ViewController
  @synthesize cameraSystemButton = _cameraSystemButton;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UICollectionViewFlowLayout *aFlowLayout = [[UICollectionViewFlowLayout alloc] init];
      cameraSystemMenu = [[CameraSystemMenuViewController alloc] initWithCollectionViewLayout:aFlowLayout];
  
      popoverController = [[UIPopoverController alloc] initWithContentViewController:cameraSystemMenu];
      [popoverController setDelegate:self];
  
  }
  
  - (IBAction)cameraSystemSelectButton:(id)sender
  {
      [popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
      [popoverController setPopoverContentSize:CGSizeMake(320, 400)];
  
  }
  @end
  </code></pre>
  
  <p>And here is my cellForItemAtIndexPath in <strong>CameraSystemMenuViewController.m</strong>:</p>
  
  <pre><code>-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      CameraSystemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CameraSystemCell" forIndexPath:indexPath];
      [[cell collectionImageView] setImage:cameraImage];
      cell.cameraSystemName.text = [cameraNumbers objectAtIndex:indexPath.item];
  
      return cell;
  }
  </code></pre>
  
  <p>The Cell Identifier is correct &amp; the storyboard cell has the right custom class. 
  I don't have to register because I am using a custom cell that is in the storyboard.
  What to do?</p>