Musthafa, you have several different problems here.
The first thing you are probably doing wrong. To check if the user has clicked on an arc, you are probably better off creating a path with an arc (CGPathAddArc) and then using CGPathContainsPoint.
Then you want to be sure that the arc really is what you want, it will not look like a pie, the arc is a section on the outside of the pie, and the closure will connect the ends of it, to form the pie you need to move to the center and from the center.
If you are trying to get points in a closed arc, the only way to do this is to create a CGBitmapContext and then display the path to CGContext and then CGBitmapContextGetData to get the backup data. You can then iterate to get the given values ββand add them to your NSMutableArray, as iHungry suggested.
I can also ask the question why you want to use them in a mutable array, because if you repeat them for touch testing, it can be quite slow, it is better to leave them in a bitmap :)
source share