Determine the state of the application while pressing the home button while starting the application

I would like to know what state the application will click on the iphone home button twice when the application starts. The script looks something like this:

  • IOS app running foreground

  • When launching the application, double-click the home button to open the taskbar with several tasks (obviously, my application is not listed here because it is not a recently used application and still works in the foreground)

  • Now click anywhere outside the taskbar (for example, in the application) and the application will return to focus again

My questions:

  • What will be the state of the application performing above step # 2? Will it introduce background or is it still in the foreground? Which method will be launched here?

  • Performing step number 3, the application will re-enter the foreground from the background? Again, which method will be launched here?

Any hints / suggestions would be very helpful.

+5
source share
1 answer
  • The application goes from active to inactive, so it is still in between. You should be able to use -applicationWillResignActive: in your UIApplicationDelegate.

  • After returning to the application, the application becomes active again, so it gets -applicationDidBecomeActive: on your UIApplicationDelegate.

+2
source

All Articles