Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用以下代码呈现模式视图,但是当关闭并重新打开时,它不会重置视图并显示关闭时的最后状态。怎么可能重置?
要呈现的代码
Game *gameView = [[[Game alloc] init] autorelease]; [self presentModalViewController:gameView animated:YES];
您可以添加一个 viewWillAppear 方法,该方法将在每次视图出现时被调用,并执行您希望在其中执行的任何初始化。