     
     /// Looped from last back to first page.
     @IBInspectable var looped: Bool = false
+    
+    // MARK: - Static content
     
     /// Cell identifiers for finite static content.
     @IBInspectable var cell0Identifier: String?

    }
    
    override func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
        if looping {
            scrollToPage(page, animated: false)
        }
    }
    

        }
    }
    
    // MARK: - Override in subclass for dynamic content

    /// Override in subclass for dynamic content or use default implementation for static content.
    var pageCount: Int {
        return cellIdentifiers?.count ?? 0
    }
    
    /// Override in subclass for dynamic content or use default implementation for static content.
    override func collectionView(collectionView: UICollectionView,
                                 cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
    {
        let page = pageForIndexPath(indexPath)
        let cellIdentifier = cellIdentifiers![page]
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(cellIdentifier, forIndexPath: indexPath)
        return cell
    }
    
    // MARK: - Variables
    
    var currentPage: Int {
        return Int(round(currentPageFloat))
    }
    
    var currentPageFloat: CGFloat {
        return currentCellItem - (shouldLoop ? 1 : 0)
    }
    
    var pageControl = UIPageControl()
    var collectionViewSize: CGSize?
    
    // MARK: - Private variables
    
    private var shouldLoop: Bool {
        return looped && pageCount > 1
    }
    
    private var currentCellItem: CGFloat {
        return collectionView!.contentOffset.x / collectionViewSize!.width
    }
    
    // MARK: - Actions
