0

我想知道当用户玩游戏时,iphone是如何处理这四种可能性的。你们也可以指出更多的可能性。

○ 用户在单人游戏中收到短信

○ 用户在多人游戏中接到电话并决定接听电话。

○ 用户在单人游戏中使用主页按钮关闭应用程序。

○ 用户在游戏外的应用程序主菜单上按下锁定按钮。

另外,在为此开发代码时我会遇到什么问题/问题?如果有人可以用图解方式解释这一点,那将非常有帮助。

4

1 回答 1

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.
}
于 2013-10-29T01:45:55.933 回答