applicationWillEnterForeground: reload Data from ViewController

前端 未结 1 1685
梦如初夏
梦如初夏 2020-12-17 04:42

I want my app to reload data as soon as the app switches from the background to the foreground.

Thats my code:

DataAppDelegate.h

#import <         


        
相关标签:
1条回答
  • 2020-12-17 05:32

    Change

        - (void)applicationWillEnterForeground:(UIApplication *)application {
        NSLog(@"app will enter foreground");
        [DataViewController refresh];
    }
    

    to

    - (void)applicationWillEnterForeground:(UIApplication *)application {
        NSLog(@"app will enter foreground");
        [viewController refresh:NULL];
    }
    
    0 讨论(0)
提交回复
热议问题