0

I am wondering how to check if a view's center is in the frame of another UIView? Example: if I have a circle which can be dragged by your finger and it's center point gets dragged to a square's frame some code gets executed? Thanks in advance, Best regards!

Nick Marinov
  • 128
  • 1
  • 10
  • What research have you done? What part has you stuck and not knowing where to look? I totally understand if you're lost , I was once, but please show where you're lost. – Stephen J Jan 07 '14 at 15:46
  • Maybe something like this? http://stackoverflow.com/questions/6501073/how-to-test-if-a-point-is-in-a-view – Yanchi Jan 07 '14 at 15:49

1 Answers1

0

You should have a look at Apple's CGGeometry Reference. In particular, you could use CGRectContainsPoint.

Mundi
  • 79,884
  • 17
  • 117
  • 140