From b080f3ef426517700a1a171298b63d539e65eab0 Mon Sep 17 00:00:00 2001 From: Justin Heo Date: Tue, 5 May 2015 13:27:43 -0700 Subject: [PATCH] Force downcast on ImageUICollectionViewCell --- .../CHTWaterfallSwiftDemo/ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftDemo/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo/ViewController.swift b/SwiftDemo/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo/ViewController.swift index e32a1c6..2871eaf 100644 --- a/SwiftDemo/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo/ViewController.swift +++ b/SwiftDemo/CHTWaterfallSwiftDemo/CHTWaterfallSwiftDemo/ViewController.swift @@ -78,7 +78,7 @@ class ViewController: UIViewController, UICollectionViewDelegate, UICollectionVi func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { // Create the cell and return the cell - var cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as ImageUICollectionViewCell + var cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as! ImageUICollectionViewCell // Add image to cell cell.image.image = model.images[indexPath.row]