It's just interesting if there is another way to check the affected area using a polygon of a certain shape, and not just use CGRectMake.
Here is the same code for this example:
CGPoint location = [[Director sharedDirector] convertCoordinate: [touch locationInView: [touch view]]];
CGRect mySurface = CGRectMake(x, y, temp.contentSize.width, temp.contentSize.height);
if(CGRectContainsPoint(mySurface, location)) {
return kEventHandled;
}
Thought to have several CGRect objects in an if statement, but wondered if there is a better way to do this, for example, something like an image map in html for anchors.
Frank source
share