When the user taps on the app icon, the app briefly goes through a transitional state ofUIApplicationStateInactive 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 toUIApplicationStateInactive.
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.
应用程序状态变化与背景运行

本文探讨了应用程序从启动到激活再到进入不活跃状态的过程,包括如何通过注册后台进程实现应用在电话呼叫等中断后的背景运行。重点在于理解不同状态之间的过渡及关键操作。
1045

被折叠的 条评论
为什么被折叠?



