2013-10-29 37 views
0

我想知道當用戶玩遊戲時,iphone如何處理這四種可能性。還有更多的可能性可以由你們指出。當用戶玩多人遊戲時,iphone如何處理短信/電話

○用戶在單人遊戲

○用戶接收在多人遊戲中的中間一個電話,並決定 接聽電話的中間收到了一條短信。

○用戶使用單個玩家遊戲中的主頁按鈕關閉應用程序。

○用戶在遊戲的 以外的應用程序的主菜單上按下鎖定按鈕。

此外,當爲此開發代碼時,會出現什麼問題/問題? 如果有人可以用圖解來解釋,這將非常有幫助。

+0

這似乎不是一個編程問題,除非您想知道幕後發生了什麼。至於哪些方法被調用。另外,這可以很容易地由你自己測試。 – Pochi

+0

我沒有iphone,而我是新編程的iphone。我試着在網上找到答案。但沒有得到實質性的。這就是我在這裏問的原因。你可以看到我已經問過在開發代碼時會遇到什麼問題。我正在嘗試構建一款多人遊戲。我想知道不同的遊戲和遊戲引擎如何處理它。 – user2877880

回答

0

此方法在您的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. 
} 
+0

嗨阿布杜拉,我正在尋找更多的用戶界面。至於iphone如何處理它。而不是代碼。 – user2877880