Need clarification about UIApplicationState

后端 未结 3 1527
不知归路
不知归路 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

    Some examples:

    UIApplicationStateActive - App is running in foreground. Simple.

    UIApplicationStateInactive - E.g. App was in the background and is opening through a push notification (transitioning atm). Or the control/notification center is presented above your app. You kind of see it, is in foreground.

    UIApplicationStateBackground - App is in the background, but still running. E.g. playing music. Then - this can take a while or not (depending on process you are running in background), but in one point your app is killed. You will see app's snapshot and icon between minimized apps, but the app will be launch again first.

提交回复
热议问题