title: incompatible type for argument 2 of 'CGRectContainsPoint'
body: <p>A long story short....</p>
  
  <p>I get <strong>incompatible type for argument 2 of 'CGRectContainsPoint'</strong> on the grid[x][y].frame part of all 3 if statements ([rubin1 frame], grid[x][y].frame), ([rubin2 frame], grid[x][y].frame) and ([rubin3 frame], grid[x][y].frame). I tried as well with [grid[x][y] frame] but got the same error.</p>
  
  <p>I wanna be able to move around rubin 1, rubin2 and rubin3 on the grid until I release them on a brick. When I release them on the brick then I want this brick to disappear as well as any other of the same type as the brick that the rubin's where left on (no matter where they are on the grid)</p>
  
  <pre><code>for (int y = 0; y &lt; BRICKHEIGHT; y++)
  {
      for (int x = 0; x &lt; BRICKWIDTH; x++) 
      {
  
  
          if (CGRectContainsPoint([rubin1 frame], grid[x][y].frame)) {
  
              if(grid[x][y].tag == 1){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 2){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 3){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 4){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 5){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 6){
  
                  ruby--;
                  rubin1.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
  
  
          } 
          if (CGRectContainsPoint([rubin2 frame], grid[x][y].frame)) {
  
              if(grid[x][y].tag == 1){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 2){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 3){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 4){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 5){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 6){
  
                  ruby--;
                  rubin2.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
  
          } 
          if (CGRectContainsPoint([rubin3 frame], grid[x][y].frame)) {
  
              if(grid[x][y].tag == 1){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 2){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 3){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 4){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 5){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
                  [self PlayerScore: x y: y];
  
              }
              else if(grid[x][y].tag == 6){
  
                  ruby--;
                  rubin3.alpha = 0;
                  grid[x][y].alpha = 0;
  
  
  
  
  
              }
          }
      }
  }
  </code></pre>