Need clarification about UIApplicationState

后端 未结 3 1525
不知归路
不知归路 2020-12-15 07:34

I need your help in clarifying my understanding of the various states of an app. I am going to state my interpretation - but please feel free to correct me.

1) A

3条回答
  •  情话喂你
    2020-12-15 07:51

    When the user taps on the app icon, the app briefly goes through a transitional state of UIApplicationStateInactive on its way to becoming UIApplicationStateActive. This is where the app gets itself ready to display to the user.

    When the app is open, the application state is UIApplicationStateActive.

    If the user presses the home button, and is returned to the springboard (home screen), or the application is interrupted by something, such as a phone call, the application state transitions back to UIApplicationStateInactive.

    For the application state of your app to become UIApplicationStateBackground, your application would have to register for a background process. Look into how to background your location services.

提交回复
热议问题