gpt4 book ai didi

iphone - 从应用内调用并保留应用状态

转载 作者:行者123 更新时间:2023-11-28 20:44:49 25 4
gpt4 key购买 nike

在我的应用程序中,我需要在页面上显示一些信息,包括电话号码。我需要允许用户从此页面调用电话,并且还希望在通话结束后保留​​应用程序的状态,即一旦用户完成通话,他应该返回到他离开的原始页面。如何实现?

最佳答案

iOS4 具有多任务处理功能。

您无需执行任何操作。用户点击某处,调用电话,结束电话,然后 AppDelegate 中的 applicationDidBecomeActive: 被调用。您的应用会准确返回到用户离开的位置。

来自 UIApplicationDelegate's Protocol Reference :

This method is called to let your application know that it moved from the inactive to active state. This can occur because your application was launched by the user or the system. Applications can also return to the active state if the user chooses to ignore an interruption (such as an incoming phone call or SMS message) that sent the application temporarily to the inactive state.

关于iphone - 从应用内调用并保留应用状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6834960/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com