title: UICollectionView Using Swift
body: <p>In My Project I created Cell in UICollectionViewCell</p>
  
  <p>Its got Error Terminating app due to uncaught exception</p>
  
  <p>The code as follow.</p>
  
  <p><strong>GalleryCell.swift</strong></p>
  
  <pre><code>class GalleryCell: UICollectionViewCell
  {
  
  
  @IBOutlet var titleLabel : UILabel
  
  
  init(coder aDecoder: NSCoder!)
  {
      super.init(coder: aDecoder)
  }
  }
  </code></pre>
  
  <p>and I used this cell in My ViewController:</p>
  
  <p>The code as follow :</p>
  
  <p>NextViewController.swift</p>
  
  <pre><code>import UIKit
  
   class NextViewController: UIViewController
   {
  
  @IBOutlet var collectionView : UICollectionView
  
  
  
  var ListArray=NSMutableArray()
  
  
  
  override func viewDidLoad()
  {
      super.viewDidLoad()
  
  
      for i in 0..70
      {
           ListArray .addObject("C: \(i)")
      }
  
  
  
  
  }
  
  
  
     func collectionView(collectionView: UICollectionView, numberOfItemsInSection section:Int)-&gt;Int
      {
          return ListArray.count
     }
  
  
  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath:NSIndexPath)-&gt;UICollectionViewCell
  {
  
    var  cell = collectionView.dequeueReusableCellWithReuseIdentifier("CELL", forIndexPath: indexPath) as GalleryCell
  
  
      cell.titleLabel.text="\(ListArray.objectAtIndex(indexPath.item))"
  
      return cell
  }
  
  
  func collectionView(collectionView : UICollectionView,layout collectionViewLayout:UICollectionViewLayout,sizeForItemAtIndexPath indexPath:NSIndexPath) -&gt; CGSize
  {
  
      return CGSizeMake(66, 58)
  }
  
  
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My issue is I am getting following error:</p>
  
  <pre><code>***** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier CELL - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'*** First throw call stack:**
  </code></pre>