当应用程序进入前台时重新加载应用程序数据? [英] Reload application data when the app comes into foreground?

查看:113
本文介绍了当应用程序进入前台时重新加载应用程序数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone开发人员的新手......我正在构建一个从本地sqlite3数据库加载数据的应用程序

i'm new to iPhone dev ... i'm building an app that loads data from a local sqlite3 db in

-   (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {   

当我点击iPhone按钮并将其放在背景中然后我回想起它我看到(正常)应用程序的方式与我离开它的方式相同。我想做的是,当它出现在foregroud中时,就像从头开始调用数据一样重新加载数据。

When i tap iPhone button and put it in background and then i recall it i see (as normal) the app in the same way i leaved it. What i would like to do is, when it comes in foregroud, to reload data as if it was called from scratch.

这是正确的方法吗?

提前致谢
c。

Thanks in advance c.

推荐答案

- (void)applicationDidBecomeActive:(UIApplication *)application {
}

重新加载应用程序委托的上述功能中的数据,以便在应用程序到达前台时刷新数据。

Reload the data in the above function of the app delegate to refresh the data when ever the app comes to foreground.

这篇关于当应用程序进入前台时重新加载应用程序数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆