gpt4 book ai didi

ios - 进入Suspended状态后会调用AppDelegate的什么方法?

转载 作者:可可西里 更新时间:2023-11-01 17:04:23 26 4
gpt4 key购买 nike

我的应用程序进入后台,如果我再次打开,它会显示我离开它的同一页面。

虽然,如果 iOS 将应用程序置于暂停状态,但它仍在内存中。如果我回来,将调用哪些 AppDelegate 方法。

实际上我的目的是将相同的屏幕从暂停状态恢复到应用程序,如果它没有被终止的话。

最后,如果应用从暂停状态返回,将调用 didFinishLaunchWithOptions 吗?

谢谢..

最佳答案

作为Apple Documentation州,

  • application:willFinishLaunchingWithOptions:—This method is your app’s first chance to execute code at launch time.

  • application:didFinishLaunchingWithOptions:—This method allows you to perform any final initialization before your app is displayed to the user.

  • applicationDidBecomeActive:—Lets your app know that it is about to become the foreground app. Use this method for any last minute
    preparation.

  • applicationWillResignActive:—Lets you know that your app is transitioning away from being the foreground app. Use this method to
    put your app into a quiescent state.

  • applicationDidEnterBackground:—Lets you know that your app is now running in the background and may be suspended at any time.

  • applicationWillEnterForeground:—Lets you know that your app is moving out of the background and back into the foreground, but that it is not yet active.

  • applicationWillTerminate:—Lets you know that your app is being terminated. This method is not called if your app is suspended.

所以 applicationWillEnterForegroundapplicationWillResignActive 将被调用!

关于ios - 进入Suspended状态后会调用AppDelegate的什么方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40780417/

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