I want to create a view with a UIImageView inside it, where the user can draw a circle on a specific area of the UIImageView. Then, the view clears once they have finished drawing and when they draw again, if the drawing is inside the last drawing’s circle, an alert appears saying ‘Correct’.
How can this be done? I’ve already looked at projects like this, but I haven’t managed to find out how to actually draw the boundaries and set an if statement up to decide whether the user is drawing within or outside the boundaries on their second drawing.
If you create a
UIBezierPathof the “safe” area, you can then use the methodcontainsPoint:which returns: (quote from apple docs)you would probably need to detect touches and check each touch point