Frage

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!

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top