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? -

sql - text truncated using perl DBI insert -

php - Pass object by reference or value -