         collectionView.pagingEnabled = true
         collectionView.showsVerticalScrollIndicator = false
         collectionView.backgroundColor = UIColor.whiteColor()
+        collectionView.decelerationRate = UIScrollViewDecelerationRateFast
         self.view.addSubview(collectionView)
         
         // Register cell classes

    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        setCurrentPageNumber()
//        delegate.readerDidAppear()
    }


    var collectionView: UICollectionView!
    var pages: [String]!
    var totalPages: Int!
    var pageWidth: CGFloat!
    var pageHeight: CGFloat!
    var currentPageNumber: Int!
    var currentPage: FolioReaderPage!
    var delegate: FolioReaderViewControllerDelegate!
    
