Need clarification about UIApplicationState

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

    Apple documentation: UIApplicationState Constants Reference

    • Swift: .Active | Objective-C: UIApplicationStateActive

    The app is running in the foreground and currently receiving events.

    Available in iOS 4.0 and later.

    • Swift: .Inactive | Objective-C: UIApplicationStateInactive

    The app is running in the foreground but is not receiving events. This might happen as a result of an interruption or because the app is transitioning to or from the background.

    Available in iOS 4.0 and later.

    • Swift: .Background | Objective-C: UIApplicationStateBackground

    The app is running in the background.

    Available in iOS 4.0 and later.

提交回复
热议问题