title: Check if nodes are off the screen
body: <p>I have a node on my screen that is moved with the gyroscope. But I can't limit it's position to the screen, I have tried this, but it only worked for the bottom and the the top: </p>
  
  <pre><code>override func update(currentTime: CFTimeInterval){
  
       ...
  
       if sprite.position.x &lt;= sprite.frame.width / 2 {
            print("out on the left of the screen")
       }
       if sprite.position.x &gt;= self.frame.width - sprite.frame.width / 2 {
            print("out on the right of the screen")
       }
       if sprite.position.y &lt;= sprite.frame.height / 2 {
            print("out on the top of the screen")
            //worked
       }
       if sprite.position.y &lt;= self.frame.height - sprite.frame.height / 2 {
            print("out on the bottom of the screen")
            //worked
       }
  
  }
  </code></pre>