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
Post a Comment