Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

drf1229

macrumors regular
Original poster
Jun 22, 2009
237
0
I have two UIViews, one inside the other. I have two imageviews, one in each view. Is it possible to detect the intersection of the two imageviews? Any advice is greatly appreciated!
 
Since you said the two imageViews have different parent views, you'll also need to call convertRect:fromView: at some point to convert one of the frames into the other's coordinate system. Remember that a UIView's frame/position/center is relative to its parent, not in pure screen coordinates.
 
Since you said the two imageViews have different parent views, you'll also need to call convertRect:fromView: at some point to convert one of the frames into the other's coordinate system.
Thank you so much, that was the kind of thing I was looking for!
Remember that a UIView's frame/position/center is relative to its parent, not in pure screen coordinates.
That was my main problem.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.