If you have the CGPath of this circle, you can get CGPoint, where the user's finger has got inside touchsBegan and check if he gets into this CGPath using the following code.
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:self.view];
if (CGPathContainsPoint(yourCircle, nil, location, nil)) {
} else {
}
}
Jacob source
share