How are these regions defined? If you can get the point data, then create a CGPath using:
CGPathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path,null,xpoints[0],ypoints[0])
for (int i = 1; i < numpoints; ++i) {
CGPathAddLineToPoint(path,null,xpoints[i],ypoints[i]);
}
CGPathCloseSubpath(path);
Then whenever the user touches, for each region, check whether it contains the touch point:
if (CGPathContainsPoint(path,null,touchPoint,false)) ...
And don't forget to release when you're done with the regions:
CGPathRelease(path);
Note that you can create several separate subpaths in one CGPathRef and it will check all the subpaths when you check for containment.
If you want to, you can try using arcs or curves to get the lines right, but that's something I'm not too familiar with.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…