 let peekViewTag = 1929
 let tickImageViewTag = 1930
 let buttonVerticalPadding = CGFloat(15)
+var fromTouchToContentCenter = CGFloat(0)
 
 @objc public enum PeekViewActionStyle : Int {
     case `default`

                    }
                }
            default:
                break
            }
            

                parentController.addChildViewController(contentController)
                contentController.didMove(toParentViewController: parentController)
                
                // DuyNT: Calculate distance from touch location to vertical center point of contentView, and when the touch location moves as the user swiping his hand, vertical center point of contentView will be recalculated, resulting in a nicer visual which contentView center does not necessary be aligned with user's finger as in original solution.
                if let view = window.viewWithTag(peekViewTag) as? PeekView {
                    let pointOfHand = gesture.location(in: view.superview).y
                    fromTouchToContentCenter = pointOfHand - screenHeight / 2
                }
                
            case .changed:
                if let view = window.viewWithTag(peekViewTag) as? PeekView {
                    
                    // DuyNT: Here we use the number calculated before to get 'better' center position of contentView
                    let pointOfHand = gesture.location(in: view.superview!).y
                    var centerOfContent = CGFloat(0)
                    
                    centerOfContent = pointOfHand - fromTouchToContentCenter
                    
                    view.updateContentViewFrame(centerOfContent)
                }
            case .ended:
                fromTouchToContentCenter = CGFloat(0)
                
                if let view = window.viewWithTag(peekViewTag) as? PeekView {
                    if let buttonHolderView = view.buttonHolderView, let contentView = view.contentView {
                        if buttonHolderView.frame.minY <= view.frame.maxY - buttonHolderView.frame.height - buttonVerticalPadding {
