objective c - ios determine if subviews overlap (hit test?) -


i have bunch of subviews , want determine if ballview has hit paddleview. (i making simple version of breakout). best way this?

ballview , paddleview both subview of blockbreakerview

you can use cgrect* functions. cgrectintersectsrect() accept 2 rects (for ball.frame , paddleview.frame) , return simple bool denoting if overlap.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -