     // MARK: - UICollectionViewDataSource
     
     func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
+        return self.photos.count
+    }
+    
+    func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
         return 1
     }
-    
-    func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return self.photos.count
-    }
-
     
     func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
         let cell: BRNImageCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as BRNImageCollectionViewCell
-        cell.imageView.image = self.photos[indexPath.row]
+        cell.imageView.image = self.photos[indexPath.section]
         
         return cell
     }
     
     func collectionView(collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
-        let photo = self.photos[indexPath.row]
+        let photo = self.photos[indexPath.section]
         let height = CGRectGetHeight(self.frame) - BRNImagePreviewCell.sectionInset.top - BRNImagePreviewCell.sectionInset.bottom
         let factor = height / photo.size.height
         
         return CGSizeMake(factor * photo.size.width, height)
     }
     
+    func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
+        let view: BRNImageSupplementaryView = collectionView.dequeueReusableSupplementaryViewOfKind(UICollectionElementKindSectionFooter, withReuseIdentifier: "SupplementaryView", forIndexPath: indexPath) as BRNImageSupplementaryView
+        view.userInteractionEnabled = false
+        
+        self.sections[indexPath.section] = view
+        return view
+    }
+    
     // MARK: - UICollectionViewDelegate
     
     func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
-        self.delegate?.imagePreviewCell?(self, didSelectImageAtIndex: indexPath.row)
+        let possibleView = self.sections[indexPath.section]
+        if let view = possibleView {
+            view.selected = true
+        }
+        
+        self.delegate?.imagePreviewCell?(self, didSelectImageAtIndex: indexPath.section)
     }
     
     func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) {
-        self.delegate?.imagePreviewCell?(self, didDeselectImageAtIndex: indexPath.row)
+        let possibleView = self.sections[indexPath.section]
+        if let view = possibleView {
+            view.selected = false
+        }
+        
+        self.delegate?.imagePreviewCell?(self, didDeselectImageAtIndex: indexPath.section)
     }
 
     // MARK: - Layout
     
     override func layoutSubviews() {
+        super.layoutSubviews()
+        
         self.collectionView.frame = self.bounds
     }
 

        return ["Photo Library", "Take Photo or Video", "Cancel"]
    }
    
    private class var animationDuration: Double {
        return 0.3
    }
    
    private let overlayView = UIView()
    private let tableView = UITableView()
    
    // MARK: Initialization
    

        let layout = UICollectionViewFlowLayout()
        layout.scrollDirection = .Horizontal
        layout.sectionInset = BRNImagePreviewCell.sectionInset
        layout.footerReferenceSize = CGSizeMake(20.0, 100)
        self.collectionView = UICollectionView(frame: CGRectZero, collectionViewLayout: layout)
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.collectionView.dataSource = self
        self.collectionView.delegate = self
        self.collectionView.contentInset = BRNImagePreviewCell.contentInset
        self.collectionView.backgroundColor = UIColor.clearColor()
        self.collectionView.showsHorizontalScrollIndicator = false
        self.collectionView.alwaysBounceHorizontal = true
        self.collectionView.registerClass(BRNImageCollectionViewCell.classForCoder(), forCellWithReuseIdentifier: "Cell")
        self.collectionView.registerClass(BRNImageSupplementaryView.classForCoder(), forSupplementaryViewOfKind: UICollectionElementKindSectionFooter, withReuseIdentifier: "SupplementaryView")
        self.addSubview(self.collectionView)
    }

