title: Using TouchesMoved in Swift 2
body: <p>I'm making a SpriteKit game in XCode using swift. I want to make custom buttons in the menu, and I'm following <a href="https://nathandemick.com/programming/tutorial/2014/09/23/buttons-sprite-kit-using-swift.html" rel="nofollow">this tutorial</a> to do it. Everything's working fine except the touchesMoved function.</p>
  
  <pre><code>override func touchesMoved(touches: NSSet, withEvent event: UIEvent) {
  var touch: UITouch = touches.allObjects[0] as UITouch
  var location: CGPoint = touch.locationInNode(self)
  
  if defaultButton.containsPoint(location) {
      activeButton.hidden = false
      defaultButton.hidden = true
  } else {
      activeButton.hidden = true
      defaultButton.hidden = false
  }
  }
  </code></pre>
  
  <p>Apparently, the "<em>touches.allObjects[0] as UITouch</em>" doesn't work anymore in Swift 2. I've searched for alternatives, but I haven't found any that works. How could I replace that line of code?</p>