 
     var mainViewTopSpaceLayoutConstraintValue: CGFloat!
     var mainViewOriginY: CGFloat!
+    var hiddenTopViewDefaultPosition: CGFloat!
+    var xiaoyunOriginX: CGFloat!
+    var middleImageViewHasBeenEnlarged = true
     
     @IBOutlet weak var mainView: UIView!
     

        mainViewTopSpaceLayoutConstraintValue = topLayoutConstraintOfMainView.constant
        mainViewOriginY = mainView.frame.origin.y
        panGesture.addTarget(self, action: "pan:")

        // Do any additional setup after loading the view, typically from a nib.
//        let button = NSBundle.mainBundle().loadNibNamed("RoundButton", owner: self, options: nil).first as! UIButton
//        button.center = self.view.center
//        self.view.addSubview(button)
    }

    override func didReceiveMemoryWarning() {

    
    func pan(recongnizer: UIPanGestureRecognizer) {
        if panGesture.state == UIGestureRecognizerState.Ended {
            middleImageViewHasBeenEnlarged = true
            UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseInOut, animations: { () -> Void in
                    recongnizer.view?.frame.origin.y = self.mainViewOriginY
                
                    //make animated views move
                    self.hiddenTopView.frame.origin.y = self.hiddenTopViewDefaultPosition
                }, completion: { (success) -> Void in
                    if success {
                        self.topLayoutConstraintOfMainView.constant = self.mainViewTopSpaceLayoutConstraintValue
