title: SpriteKit detect end of Contact
body: <p>I'm trying to figure out how to detect when the contact between two bodies ends. I'm working on a car game something like alpine crawler and only when the rear wheel is touching the ground the car is able to accelerate.</p>
  
  <p>This is my code for now but it doesn't work proper:</p>
  
  <pre><code>- (void) didBeginContact:(SKPhysicsContact *)contact
  {
      if (([contact.bodyB.node.name isEqualToString:@"rearWheel"] &amp;&amp;
           [contact.bodyA.node.name isEqualToString:@"ground"])) {
          isWheelOnGround = YES;
      }
  }
  
  -(void) didEndContact:(SKPhysicsContact *)contact {
  
          if (([contact.bodyB.node.name isEqualToString:@"rearWheel"] &amp;&amp;
               [contact.bodyA.node.name isEqualToString:@"ground"])) {
              isWheelOnGround = NO;
          }
      }
  </code></pre>