こんにちは 特定のイベントが発生すると、私はいくつかのメソッド(ゲーム内のロック解除されたトロフィー)を呼び出し、それらは表示され、サブビューが消えます。 クラッシュ(正しく)は、これらのイベントが同時に発生して重複した場合に発生します。 どうすれば "あなたの番を待ってください:)"を確認できますか?これらのイベントが同時に発生し、重なる場合 おかげメソッド "あなたのターンを待つ"!
-(void)trofeiLaunch:(int)x {
CGRect loseFrame = CGRectMake(0, 0, 480, 320);
TrofeoView = [[UIView alloc] initWithFrame:loseFrame];
TrofeoView.alpha = 0.0;
[UIView beginAnimations:nil context:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDuration:0.5];
[UIImageView setAnimationDelegate:self];
TrofeoView.alpha = 1.0;
[UIView setAnimationDidStopSelector:@selector(bridgeTrofei)];
[UIView commitAnimations];
[self.view addSubview:TrofeoView];
[TrofeoView release];
....
}
-(void)bridgeTrofei {
TrofeoView.alpha = 1.0;
[UIView beginAnimations:nil context:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
TrofeoView.alpha = 0.0;
[UIView commitAnimations];
[self performSelector:@selector(deleteTrofei) withObject:self afterDelay:1.0];
}
-(void)deleteTrofei {
[TrofeoView removeFromSuperview];
NSLog(@"delete");
}
クラッシュ(正しく)が発生します。 どうすれば "あなたの番を待ってください:)"を確認できますか? ありがとう
あなたはどんな種類のクラッシュを見ていますか?メイン選択ラインの – Anomie
:int retVal = UIApplicationMain(argc、argv、nil、nil);コンパイラで:sharedlibrary apply-load-rules all 現在の言語:auto;現在objective-c – Vins