         return NSIndexPath(forItem: minIdx, inSection: 0)
     }
     
+    private func centerOffset() -> CGPoint {
+        var center = self.collectionView!.contentOffset
+        center.x += self.width / 2
+        return center
+    }
+    
     private func centeredOffsetForIndex(indexPath: NSIndexPath) -> CGPoint {
         var newX: CGFloat = 0
         if circulating {

    
    private var pageControl: UIPageControl!
    private var currentRealPage: Int = -1
    private var currentPage: Int = -1
    private var preferredPageConrolHidden: Bool = false
    public var collectionView: UICollectionView?
    private var collectionLayout: HFSwipeViewFlowLayout?
    

    
    public var pageControlHidden: Bool {
        set(hidden) {
            pageControl.hidden = hidden
        }
        get {
