Coco2d で UIalert を追加すると、1 回目は正常に表示されるが、次の表示で 2 回表示が悪くなり、プレイヤー情報を入力するために cocos2d に UITextField を追加すると、このシーンを離れるときに
UITextField が解放されているはずですが、他のシーンではこの UITextField はまだ画面上にあります
1 に答える
0
UIAlert に問題がありますか? iOSゲームで何度も使用しました。うまくいった
UIAlertView* alert= [[[UIAlertView alloc] initWithTitle: @"Not Enough Coins!"
message: @"You need more Coins"
delegate: nil
cancelButtonTitle: @"Cancel"
otherButtonTitles:@"Ok", nil] autorelease];
[alert show];
他の UI 要素については、離れるときに離します。
-(void)onExit
{
if(mytextBox)
{
[mytextBox removeFromSuperview];
}
[super onExit];
}
于 2013-02-22T10:19:59.610 に答える