此方法在您的AppDelegate.m
。當用戶退出應用程序,撥打電話或收到短信時,會調用此方法:
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
這似乎不是一個編程問題,除非您想知道幕後發生了什麼。至於哪些方法被調用。另外,這可以很容易地由你自己測試。 – Pochi
我沒有iphone,而我是新編程的iphone。我試着在網上找到答案。但沒有得到實質性的。這就是我在這裏問的原因。你可以看到我已經問過在開發代碼時會遇到什麼問題。我正在嘗試構建一款多人遊戲。我想知道不同的遊戲和遊戲引擎如何處理它。 – user2877880