gpt4 book ai didi

iPhone:从前台/后台切换回来后重新加载 View ?

转载 作者:行者123 更新时间:2023-12-03 21:10:48 28 4
gpt4 key购买 nike

这是针对具有多任务问题的 iOS4。当我的应用程序从后台运行的应用程序重新出现后,如何重新加载 View ?

最佳答案

您希望 View Controller 监听 UIApplicationWillEnterForegroundNotification :

Posted shortly before an application leaves the background state on its way to becoming the active application.

iOS Application Programming Guide中也提到了:

The UIApplicationWillEnterForegroundNotification notification is also available for tracking when your application reenters the foreground. Objects in your application can use the default notification center to register for this notification.

在此通知的处理程序中,您可以触发所需的任何刷新/重绘。

您可以在Cocoa Core Competencies中阅读有关通知的更多信息。文档。

关于iPhone:从前台/后台切换回来后重新加载 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3421016/

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