start and end are both CGPoints. I've drawn an auxiliary line between them to help model the situation. I want to be able to test if an object (UIImageView --> [imageView frame] aka CGRect) is intersected by that line.
Asked
Active
Viewed 49 times
0
vqdave
- 2,262
- 1
- 17
- 35
-
1Take a look at this SO thread: http://stackoverflow.com/questions/17755819/determine-if-line-intersects-cgrect – Janis Kirsteins Feb 23 '14 at 20:46
-
http://stackoverflow.com/questions/16203760/how-to-check-if-line-segment-intersects-a-rectangle – Merlevede Feb 23 '14 at 20:47
-
That worked for me. Thanks! @JānisK – vqdave Feb 23 '14 at 21:24