このコードを使用して、2 つの画像間の衝突を検出しようとしていますが、そのうちの 1 つはアニメーションにありますが、機能しません。
[UIView animateWithDuration:5 animations:^{
bird.center = CGPointMake(bird.center.x, 600);
fallTimer = [NSTimer scheduledTimerWithTimeInterval:.001 target:self selector:@selector(check) userInfo:nil repeats:YES];
}];
-(void)check {
if (CGRectIntersectsRect(bird.frame, cat.frame)) {
NSLog(@"YES");
}
}
どうすれば衝突を検出できますか?