title: How to get a sprite rect in a convenient way?
body: <p>In cocos2d game development, <strong>CGRectContainsPoint</strong> method often used to detect if touch on a  CCSprite.</p>
  
  <p>I use code fllow to get a sprite's (which in a CCNode) rect property </p>
  
  <pre>
  - (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {
      CCLOG(@"ccTouchEnded");
      CGPoint location = [touch locationInView:[touch view]];
      location = [[CCDirector sharedDirector] convertToGL:location];
      CCLOG(@"location.x:%f, y:%f", location.x, location.y);
      CGRect rect;
  
      rect = CGRectMake(self.firstCard.face.position.x-(self.firstCard.face.contentSize.width/2), self.firstCard.face.position.y-(self.firstCard.face.contentSize.height/2),
                        self.firstCard.face.contentSize.width, self.firstCard.face.contentSize.height);
      if (CGRectContainsPoint(rect, location)) {
          CCLOG(@"first card touched");
          [firstCard open];
      }
  
      rect = CGRectMake(self.secondCard.face.position.x-(self.secondCard.face.contentSize.width/2), self.secondCard.face.position.y-(self.secondCard.face.contentSize.height/2),
                        self.secondCard.face.contentSize.width, self.secondCard.face.contentSize.height);
      if (CGRectContainsPoint(rect, location)) {
          CCLOG(@"second card touched");
          [secondCard open];
      }
  
  
  }
  
  </pre>
  
  <p>I want to know if there is a convenient way to <strong>get a CCSprite 's rect</strong> straightforward?</p>