     self.initRotationBtn()
     self.onTickTimer()
     self.addTapGesture()
+    self.addPanGesuture()
   }
   
   func initBackgroundView() {

      self.view.addGestureRecognizer(singleTap)
    }
  }
}

// MARK: View Handling

  
  func pressedRotationBtn(sender: UIButton) {
    self.isRotate = !self.isRotate
  }
  func changeViewAlpha(nowPoint: CGPoint) {
    let alpha = self.view.alpha
    
    if let lastPoint = lastTranslation {
      if lastPoint.y > nowPoint.y && alpha < 1.0 {
        self.view.alpha = alpha + 0.01
      } else if lastPoint.y < nowPoint.y && alpha >= 0.02 {
        self.view.alpha = alpha - 0.01
      }
    }
    lastTranslation = nowPoint
  }
  
  func displayGestureForPanGestureRecognizer(sender: UIPanGestureRecognizer) {
    let translation = sender.translationInView(self.view)
    
    switch (sender.state) {
    case .Began:
      lastTranslation = translation
      break
    case .Changed:
      self.changeViewAlpha(translation)
      break
    case .Cancelled:
      fallthrough
    case .Ended:
      fallthrough
    case .Failed:
      fallthrough
    case .Possible:
      fallthrough
    default:
      lastTranslation = nil
    }
  }
}

