Ios 重新打开应用程序后再次读取数据库

Ios 重新打开应用程序后再次读取数据库,ios,objective-c,methods,Ios,Objective C,Methods,我正在开发一个应用程序,从parse.com读取数据库,并在MapKit地图上绘制坐标。一切正常,但当我在parse.com网站上手动添加新pin时,在按下手机上的“主页”按钮后打开应用程序时,该pin不会显示 在哪里以及如何询问该应用程序是否已被击落 希望我能以一种可以理解的方式解释 每次打开应用程序时,都能用发布图像等从零开始打开应用程序,这也很好。但我认为这是不可能的,因为人们总是要通过双击手机来关闭后台的应用程序 感谢您的回答如果“应用程序已被击落”,您的意思是在按下“主页”按钮后应用程

我正在开发一个应用程序,从parse.com读取数据库,并在MapKit地图上绘制坐标。一切正常,但当我在parse.com网站上手动添加新pin时,在按下手机上的“主页”按钮后打开应用程序时,该pin不会显示

在哪里以及如何询问该应用程序是否已被击落

希望我能以一种可以理解的方式解释

每次打开应用程序时,都能用发布图像等从零开始打开应用程序,这也很好。但我认为这是不可能的,因为人们总是要通过双击手机来关闭后台的应用程序


感谢您的回答

如果“应用程序已被击落”,您的意思是在按下“主页”按钮后应用程序移动到后台,那么要了解此事件,您需要在appdelegate.m中实现
ApplicationIdentinterBackground:
方法

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    NSLog(@"App Active");

    /* Restart any tasks that were paused (or not yet started) 
    while the application was inactive. 
    If the application was previously in the background, 
    optionally refresh the user interface.
    */
}
这些函数和注释是在启动新项目时由xcode创建的

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    NSLog(@"App Background");
    /* Use this method to release shared resources, save user data, 
    invalidate timers, and store enough application state information 
    to restore your application to its current state 
    in case it is terminated later.
    If your application supports background execution, 
    this method is called instead of applicationWillTerminate: 
    when the user quits.
    */
}
要知道应用程序何时再次打开,请在appdelegate.m中实现
applicationIDBecomeActive:
方法

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    NSLog(@"App Active");

    /* Restart any tasks that were paused (or not yet started) 
    while the application was inactive. 
    If the application was previously in the background, 
    optionally refresh the user interface.
    */
}

在视图中,加载调用解析函数并将其存储在数据库中