         imageView.setTranslatesAutoresizingMaskIntoConstraints(false)
         scrollView = UIScrollView(frame: frame)
         scrollView.setTranslatesAutoresizingMaskIntoConstraints(false)
+        scrollView.contentSize = CGSizeMake(50, 50)
 
         super.init(frame: frame)
 

        flowLayout.scrollDirection = UICollectionViewScrollDirection.Horizontal
        flowLayout.minimumInteritemSpacing = 0
        flowLayout.minimumLineSpacing = 0
        //flowLayout.itemSize = viewBoundsSize

        imageCollectionView = UICollectionView(frame: view.bounds, collectionViewLayout: flowLayout)
        imageCollectionView.setTranslatesAutoresizingMaskIntoConstraints(false)

        
        //currentPage = visibleIndexes.first?.item ?? 0

        currentPage = getCurrentPage()

        // If the scroll animation ended, update the page control to reflect the current page we are on
        pageControl.currentPage = currentPage
        println("currentPage: \(currentPage)")
