     }
     private var panCollect:UIPanGestureRecognizer = UIPanGestureRecognizer()
     private var isPanVertical:Bool = false
+    private var locationInViewX:CGFloat = 0
+    private var locationRatio:CGFloat = 0
     
     override func viewWillAppear(animated: Bool) {
         super.viewWillAppear(animated)

    func handleCollectPanGesture(recognizer:UIPanGestureRecognizer) {
        if recognizer.state == UIGestureRecognizerState.Began {
            let velocity = recognizer.velocityInView(view)
            if fabs(velocity.x) <= fabs(velocity.y) {
                isPanVertical = true
            }
        } else if recognizer.state == UIGestureRecognizerState.Changed {

                if translation.y >= 0 {
                    let newCellWidth = normalCellWidth - (translation.y * minCellRatio * normalCellWidth) / CELL_NORMAL_HEIGHT
                    let newCellHeight = CELL_NORMAL_HEIGHT - translation.y * minCellRatio
                    let ratio = newCellWidth / normalCellWidth
                    let newCellGap = ratio * cellGap
                    let fastenCellGap = locationInViewX - locationRatio * (newCellWidth + newCellGap)
                    collectLayout.itemSize = CGSizeMake(newCellWidth, newCellHeight)
                    collectLayout.minimumLineSpacing = newCellGap
                    collectLayout.sectionInset = UIEdgeInsetsMake(CELL_NORMAL_HEIGHT - newCellHeight, newCellGap + fastenCellGap + translation.x, 0, newCellGap)
                    collectLayout.invalidateLayout()
                }
            }
        } else {
            collectionView.panGestureRecognizer.enabled = true
            isPanVertical = false
        }
    }
