ios – 进入Suspended状态后将调用AppDelegate的哪种方法?

ios – 进入Suspended状态后将调用AppDelegate的哪种方法?,第1张

概述我的应用程序进入后台,如果我再次打开,它显示我离开它的同一页面. 虽然,如果iOS将应用程序置于Suspended状态,但它在内存中.如果我回来,将调用哪些AppDelegate方法. 实际上我的目的是将同一屏幕从暂停恢复到应用程序,如果它没有终止. 最后,如果App从SUSPENDED状态返回,将调用Will didFinishLaunchWithOptions. 谢谢.. 如 Apple Do 我的应用程序进入后台,如果我再次打开,它显示我离开它的同一页面.

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

实际上我的目的是将同一屏幕从暂停恢复到应用程序,如果它没有终止.

最后,如果App从SUSPENDED状态返回,将调用Will 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.

所以将调用applicationWillEnterForeground和applicationWillResignActive!

总结

以上是内存溢出为你收集整理的ios – 进入Suspended状态后将调用AppDelegate的哪种方法?全部内容,希望文章能够帮你解决ios – 进入Suspended状态后将调用AppDelegate的哪种方法?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1209515.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存