i have 10 bricks, whenever my ball hit one of them i want to remove that brick. (brick breaker)
That is what i tried
for (int bri=1; bri<11; bri++) {
// NSObject *brickimg = [NSObject stringWithFormat:@"brick%d", bri];
// if (CGRectIntersectsRect(ball.frame, brickimg.frame)) {
// [UIImageView stringWithFormat:@"brick%d", bri].hidden = YES;
// }
}
and also
UIImageView *brickimg = [UIImageView stringWithFormat:@"brick%d", bri];
but no chance. How is the correct Syntax ?