     let collectionView = UICollectionView(frame: CGRectZero,
       collectionViewLayout: self.collectionViewLayout)
 
+    collectionView.setTranslatesAutoresizingMaskIntoConstraints(false)
+    collectionView.pagingEnabled = true
+    collectionView.backgroundColor = .redColor()
+    collectionView.dataSource = self.dataSource
+    collectionView.delegate = self
+
     collectionView.registerClass(LightboxViewCell.self,
       forCellWithReuseIdentifier: LightboxViewCell.reuseIdentifier)
-
-    collectionView.backgroundColor = .blackColor()
-    collectionView.dataSource = self.dataSource
-    collectionView.delegate = self
 
     return collectionView
     }()

  lazy var collectionViewLayout: UICollectionViewLayout = {
    let layout = UICollectionViewFlowLayout()
    layout.scrollDirection = .Horizontal
    layout.minimumLineSpacing = 10
    layout.minimumInteritemSpacing = 2
    layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
    return layout
    }()


public class LightboxController: UIViewController {

  var images = [UIImage]()
  var page = 0

  public lazy var dataSource: LightboxDataSource = { [unowned self] in
    let dataSource = LightboxDataSource(data: self.images)
