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.
如果用户在应用程序运行过程中接到电话,如何在通话结束后自动打开应用程序。以及如何恢复上一个会话,使用户不会从头开始?
谢谢
您需要从 UIApplicationDelegate 协议实现以下方法:
applicationWillTerminate将花几秒钟时间来保存您的应用程序当前状态。保存状态最简单的方法是通过 NSUserDefaults 类。当应用程序再次启动时,您从 NSUserDefaults 读取您的状态并将应用程序恢复到之前的状态。