title: Getting touch coordinates in Swift 1.2
body: <p>I'm trying to get the coordinates of a touch on the screen, but every time it just gives me 0, 0. I could only find basic help with this function in the new version of Swift, and nothing on this problem. What am I doing wrong here?</p>
  
  <pre><code>override func touchesEnded(touches: Set&lt;NSObject&gt;, withEvent event: UIEvent) {
          let touch = touches.first as! UITouch
          let location = touch.locationInView(self.view)
          NSLog("location: %d, %d", location.x, location.y)
  }
  </code></pre>
  
  <p>Thanks!</p>