Just wondering if there was another way to check a touched area using a polygon of a particular shape rather than just using CGRectMake.
Here's 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)) {
// do something
return kEventHandled;
}
Was thinking of having several CGRect object in the if statement, but was wondering if there was a better way to do this like something like image map in html for anchors.