Adding custom cell via NIB in UICollecitonView
<p>I have a very simple swift program using a custom cell built with a Nib in a UICollectionView. </p>

<p>When I run the application I get an error stating </p>

<blockquote>
  <p>:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:"</p>
</blockquote>

<p>I've looked at all the tutorials and have followed them exactly, it looks like I'm missing an initializer somehow but I'm at a loss. In the main default cell in the CollectionViewController in the storyboard editor I named the reuse identifier "Cell", for the Nib (swift file is named CustomCollectionViewCell.xib) I named the reuse identifier "CustomCell". I have a single UIButton in the Xib as an action which should log success if pressed.</p>

<p>Here is the mainVC:</p>

<pre><code>class MainCollectionViewController: UICollectionViewController {

override func viewDidLoad() {
    super.viewDidLoad()

    // Uncomment the following line to preserve selection between presentations
    // self.clearsSelectionOnViewWillAppear = false


    // Register cell classes
    self.collectionView!.registerNib(UINib(nibName: "CustomCell", bundle: nil), forCellWithReuseIdentifier: "Cell")

    // Do any additional setup after loading the view.
}

override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
    // #warning Incomplete implementation, return the number of sections
    return 1
}


override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
    // #warning Incomplete implementation, return the number of items
    return 1
}

override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
    let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! CustomCollectionViewCell

    // Configure the cell

    return cell
}
}
</code></pre>

<p>Here is the CustomCollectionViewCell code:</p>

<pre><code>class CustomCollectionViewCell: UICollectionViewCell {

override func awakeFromNib() {
    super.awakeFromNib()
    // Initialization code
}

required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
}


@IBAction func testButton(sender: UIButton) {
    print("Success!")
}
</code></pre>

<p>}</p>

<p>I know this is a basic, beginner item but I've looked everywhere on the web and am stumped. Any help would be appreciated.</p>