title: can't get CALayer containsPoint to work
body: <p>I've got an array of CALayers containing images which can be moved around by the user, and i'm trying to use containsPoint to detect if they have been touched - the code is as follows:</p>
  
  <pre><code>int num_objects = [pageImages count];
  
  lastTouch = [touch locationInView:self];
  
  CGRect objRect;
  CALayer *objLayer;
  
  for (int i = 0; i &lt; num_objects; i++) {
  
      objLayer = [pageImages objectAtIndex:i];
      objRect = objLayer.bounds;
  
      NSLog(@"layerPos:%@, layerBounds:%@", NSStringFromCGPoint(objLayer.position), NSStringFromCGRect(objRect));
      NSLog(@"point:%@", NSStringFromCGPoint(lastTouch));
  
      if ([objLayer containsPoint:lastTouch] == TRUE) {
          NSLog(@"touched object %d", i);
          return i;
      }
  }
  </code></pre>
  
  <p>The information i'm outputting puts the touch within the bounds of the layer (i've assumed position is the centre of the layer, i haven't altered the anchor point. The layer hasn't been rotated or anything like that either), but containsPoint: doesn't return true. Can anyone see what i'm doing wrong, or suggest a different/better way to achieve what i want?</p>