在ipad中启动应用程序时加载数据

问题描述:

我注意到在iPad中,程序在我们打开应用程序时没有初始化。就像应用程序从关闭应用程序时的状态恢复一样。请问任何人请告诉我每次开始申请时我应该怎么做才能调用方法。

I noticed that in iPad, the program does not initialize when we open an application. It is like the application is restored from the state when we closed the application. Could any one please inform me What should I do to call a method each time I start the application.

这是因为你的应用程序在最小化时实际上并没有退出。

This is because your application is not actually quit when it is minimized.

在Xcode项目导航器(左侧)中,单击您的项目(顶部)。在主区域中,在目标下选择您的应用。在顶部,选择信息。添加一行应用程序不在后台运行并将其值设置为YES。

In the Xcode project navigator (on the left), click on your project (top). In the main area, choose your app under Targets. On the top, choose "info". Add a line, "Application does not run in background" and set its value to YES.

当按下主页按钮时,这将使您的应用程序完全退出。

This will make your application quit completely when the home button is pressed.