title: Access sprite node by its name
body: <p>I am currently building an iOS game using Objective-C in SpriteKit.</p>
  
  <p>Each asteroid gets an identifier when they are spawned, using this code:</p>
  
  <pre><code>[self.asteroid setName:[NSString stringWithFormat:@"asteroid-%i", self.asteroidCounter]];
  </code></pre>
  
  <p>Now, I want to be able to remove specific asteroids from the parent based on their integer name. I tried this code, but it was seen as an error:</p>
  
  <pre><code>[self.asteroid withName:[NSString stringWithFormat:@"asteroid-%i", self.asteroidCounter] removeFromParent];
  </code></pre>
  
  <p>Is there a proper way to achieve this effect?</p>
  
  <p>Thanks in advance!</p>
  
  <p>PS: <a href="http://i.imgur.com/jdxjTPk.png" rel="nofollow">here is an image of the faulty code in Xcode, if it helps</a></p>