 
     public var numberOfImages: Int = 0
 
-    public var currentPage: Int {
-        get {
-            return Int((imageCollectionView.contentOffset.x / imageCollectionView.contentSize.width) * CGFloat(numberOfImages))
-        }
-    }
+    public var currentPage: Int = 0
 
     private var pageBeforeRotation: Int = 0
     private var currentIndexPath: NSIndexPath = NSIndexPath(forItem: 0, inSection: 0)
     private var currentCell: SwiftPhotoGalleryCell = SwiftPhotoGalleryCell()
-    private var viewBoundsSize: CGSize = CGSize() {
-        didSet {
-            println("viewBoundsSize: \(viewBoundsSize)")
-        }
-    }
 
     var pageControl:UIPageControl!
 

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

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

        super.viewDidLoad()

        //view.backgroundColor = UIColor.grayColor()

        setupCollectionView()
        setupPageControl()
