Reputation: 18318
I have a bunch of subviews and want to determine if the BallView has hit the PaddleView. (I am making a simple version of breakout). What is the best way to do this?
BallView and PaddleView are both subview of BlockBreakerView
Upvotes: 1
Views: 678
Reputation: 49335
You can use CGRect*
functions. Something like CGRectIntersectsRect()
will accept two rects (for a ball.frame
and a paddleview.frame
) and return simple BOOL
denoting if they overlap.
Upvotes: 4