I have got a UIImageView displaying a circle divided in six equal triangles corresponding to:
- area1 between 0-60 degrees
- area2 between>60-120 degrees
- area3 between>120-180 degrees
- area4 between>180-240 degrees
- area5 between>240-300 degrees
- area6 between>300-360 degrees
The circle is similar to the following (pardon me for the bad drawing):
I would like to derive from the touch point in which area the tap is. For example if the user taps at the top right corner of the circle then the area should be area 2: ">60-120".
The input data I got is:
- width and height of the frame containing the circle (e.g. 200 pixel wide, 200 pixels height)
- tap point coordinates
Any suggestion on how to infer in which area the tap point falls given the input data described above?