-2

I want to have a drawn? Circle in my iOS Screen. Around the Circle are different Words (UILabels?). The User can Drag the Words into the Circel. When a Word drops, an Action should be performed.

What is in your Option the best practice for this? Drawing everything with OpenGL/Quartz? Work only with different UIViews? What about the Word-in-Circle-Detection?

genpfault
  • 51,148
  • 11
  • 85
  • 139
d4n13l
  • 263
  • 2
  • 6

2 Answers2

1

UIViews will be much easier to implement, I guess. Word-in-Circle-Detection: Use property center of UIView or its children to find out is it in the circle or not, it's rather simple way.

Pavel Oganesyan
  • 6,774
  • 4
  • 46
  • 84
0

I've had good success with drag and drop using UIViews, specifically UIButtons. This question describes a good way to implement that.

I would make your circle a premade UIImageView so all you have to do is add it to your view rather than draw it. Then you can do some basic calculations on the coordinates of the word views when they're released to see if they fall within the circle, using an equation for a circle.

Community
  • 1
  • 1
Luke
  • 7,110
  • 6
  • 45
  • 74