in swift3
I want to change the screen to hide the original screen when the app is in the background state.
For example, if you press the home button twice while the app is running, the screen will change to a different screen.
I want to set the screen to change to LaunchScreen.
Thank you for your help.
"If you do not want your application to remain in the background when it is quit, you can explicitly opt out of the background execution model by adding the UIApplicationExitsOnSuspend key to your application’s Info.plist file and setting its value to YES.
When an application opts out, it cycles between the not running, inactive, and active states and never enters the background or suspended states.
When the user taps the Home button to quit the application, the applicationWillTerminate: method of the application delegate is called and the application has approximately five seconds to clean up and exit before it is terminated and moved back to the not running state." s