     private var reachNormalLocationYFromFullScreen:CGFloat = 0.0
     private var reachNormalTransitionYFromFullScreen:CGFloat = 0.0
     private var locationInView:CGPoint = CGPointZero
+    private var translationInView:CGPoint = CGPointZero
     private var locationRatio:CGFloat = 0
     
     override func viewWillAppear(animated: Bool) {

                        self.collectionView.panGestureRecognizer.enabled = true
                        self.isPanVertical = false
                        self.hasReachNormalHeightFromFullScreen = false
                })
            }
        }
    }
}

            }
        } else if recognizer.state == UIGestureRecognizerState.Changed {
            if isPanVertical {
                translationInView = recognizer.translationInView(view)
                var newCellHeight:CGFloat = 0
                if isFromFullScreen == false {
                    if translationInView.y >= 0 {
                        newCellHeight = computeCellHeightUnderExtraZoomOut()
                    }else {
                        newCellHeight = computeCellHeightUnderNormalZoomInOut()
                        if newCellHeight >= SCREEN_HEIGHT {
                            reachNormalHeightSetting(recognizer)
                            newCellHeight = computeCellHeightUnderExtraZoomIn()
                        }
                    }
                }else {
                    if translationInView.y >= 0 {
                        newCellHeight = computeCellHeightUnderNormalZoomInOut()
                        if newCellHeight <= CELL_NORMAL_HEIGHT {
                            reachNormalHeightSetting(recognizer)
                            newCellHeight = computeCellHeightUnderExtraZoomOut()
                        }
                    }else {
                        newCellHeight = computeCellHeightUnderExtraZoomIn()
                    }
                }
                let newCellWidth = normalCellWidth * newCellHeight / CELL_NORMAL_HEIGHT
                let ratio = newCellWidth / normalCellWidth
                let newCellGap = ratio * cellGap
                let fastenCellGap = locationInView.x - locationRatio * (newCellWidth + newCellGap)
                let targetCellheight = isFromFullScreen == false ? CELL_NORMAL_HEIGHT : SCREEN_HEIGHT
                collectLayout.itemSize = CGSizeMake(newCellWidth, newCellHeight)
                collectLayout.minimumLineSpacing = newCellGap
                collectLayout.sectionInset = UIEdgeInsetsMake(targetCellheight - newCellHeight, newCellGap + fastenCellGap + translationInView.x, 0, newCellGap)
            }
        }else if (recognizer.state == UIGestureRecognizerState.Cancelled || recognizer.state == UIGestureRecognizerState.Ended){
            if isPanVertical == true {
                let isZoomed = collectLayout.itemSize.width / normalCellWidth > 1
                let duration = isZoomed ? 0.3 : 0.2
