How to trigger a function when a user goes back to a background app?
问题 For example, an user opens an app, presses the home button, and then comes back to the app again. Is there any way to trigger certain functions when the user navigates back to the app? Such as auto load a view object when the user is back to the app. This question is for both Android & iOS. 回答1: Use the following to your likings in the projects's AppDelegate.m file (iOS only) - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from