         super.viewDidLoad()
         // Do any additional setup after loading the view, typically from a nib.
         
-        let square = UIView(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
+        square = UIView(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
         square.backgroundColor = UIColor.grayColor()
         view.addSubview(square)
         

        print("behavior: \(behavior) item1:\(item1) item2:\(item2)")
    }

}


    var animator: UIDynamicAnimator! // 动力动画
    var gravity: UIGravityBehavior! // 重力
    var collision: UICollisionBehavior! // 碰撞  通过UICollisionBehavior指定一个边界
    
    var snap : UISnapBehavior!
    var square : UIView!

    var firstContact = false
    
