             }
         }
     }
-}
-
-extension RDImageViewerController: PagingViewDataSource
-{
+//}
+//
+//extension RDImageViewerController: PagingViewDataSource
+//{
     open func pagingView(pagingView: PagingView, preloadItemAt index: Int) {
         let data = contents[index]
         if data.isPreloadable() && !data.isPreloading() {

            pagingView.isPagingEnabled = false
        }
    }
}

// MARK: - UICollectionViewDataSource
extension RDImageViewerController : UICollectionViewDataSource
{
    public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return numberOfPages
    }

}

@objcMembers
open class RDImageViewerController: UIViewController, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, PagingViewDelegate, PagingViewDataSource {

    enum ViewTag : Int {
        case mainScrollView = 1
