title: SKSpriteNode touches began/ended not working as expected when trying to make a button using swift
body: <p>ive subclasses SKSpriteNode and am trying to implement a simple button by overriding the touchesBegan and touchesEnded method of SKSpriteNode and added a couple of methods to animate the button when its pressed/released. </p>
  
  <pre><code>import Foundation
  import SpriteKit
  
  class SimpleButton: SKSpriteNode {
  
      //called when the user taps the button
      override func touchesBegan(touches: NSSet!, withEvent event: UIEvent!) {
          println("touches began")
          animateForTouchDown()
  
      }
  
      //called when the user finishes touching the button
      override func touchesEnded(touches: NSSet!, withEvent event: UIEvent!) {
          println("touches ended")
          animateForTouchUp()
      }
  
      override func touchesMoved(touches: NSSet!, withEvent event: UIEvent!) {
          println("touches moved")
      }
  
  
      func animateForTouchDown() {
  
          self.runAction(SKAction.scaleBy(0.8, duration: 0.1))
          println("animateing for touch down")
      }
  
      func animateForTouchUp() {
  
          self.runAction(SKAction.scaleBy(1.25, duration: 0.1))
          println("animating for touch up")
      }
  }
  </code></pre>
  
  <p>and add the button to my scene like so:</p>
  
  <pre><code>    let imageTexture = SKTexture(imageNamed: "a_button")
      let sprite: SimpleButton = SimpleButton(texture: imageTexture)
      sprite.userInteractionEnabled = true
      sprite.position = CGPoint(x:CGRectGetMidX(self.frame) - 200, y:CGRectGetMidY(self.frame));
      sprite.color = UIColor.blackColor()
      sprite.colorBlendFactor = 1.0
      self.addChild(sprite)
  </code></pre>
  
  <p>this works but only when the the x position of  button is on the right side of the screen. If I move the button to the left side of the screen (x &lt; 200 or so) the only way to get the button to animate is by clicking and dragging then releasing. (it looks like touches began and ended both get called on release of the button when this happens, which is strange)</p>
  
  <p>I have no idea why this is happening. It makes no sense at all to me. Ive added multiple buttons to my scene using the same exact code and the ones on the right side of the screen work great, anything on the left side of the screen past x = 200 or so you have to click and drag to make them work. any ideas? Ive tried multiple simulators, multiple iOS versions, tested on my device running 7.1, they all have the same behavior. </p>
  
  <p>update: It looks like this is happening because im loading my scene in a view controller thats pushed onto a navigation controller stack with the default show(push) animation. Any ideas how I can make this work with the animation? If I select another animation like show detail or modal in my segue it works. But I want the push animation, not the modal. </p>