1

私は自分のコードを持っていますが、変更すると思われるときに EXC_BAD_ACCESS エラーを受け取ります...任意のアイデア:

-(void) updatePlay {
    UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"bursttt" ofType:@"png"]];

    if (CGRectIntersectsRect(pinend.frame, balloonbit1.frame)){
        [maintimer invalidate];
        accelManeger.delegate = nil;
        ball.image = img;
        [UIImageView beginAnimations:nil context:NULL];
        [UIImageView setAnimationDuration:0.3];
        ball.transform = CGAffineTransformMakeScale(2, 2);
        [UIImageView commitAnimations];
    }
}
4

1 に答える 1

1

タイマーに問題がある可能性があります。あなたはそれを無効にしていますが、ゼロにはしていないので、タイマーをリセットせずにこのコードを複数回実行すると、クラッシュします。

于 2010-04-08T12:34:11.017 に答える