When an iOS application goes to the background, are lengthy tasks paused?

后端 未结 3 1794
有刺的猬
有刺的猬 2020-11-27 13:06

Yes, I know if I wish my app to be responsive to users\' multitasking actions, such as switch to another app, I should deal with

- (void)applicationWillResi         


        
3条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 14:04

    Like mentioned above, there are a few cases where your app runs in the background and apple can allow or deny depending on what you are doing.

    https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

    More importantly if you do fit into one of these categories your app refresh rate is determined by an apple algorithm that takes into consideration your app usage on that device vs other apps. If your app is used more often then it gets more background time allotted. This is just one variable but you get the idea that background time allocation varies app to app and not under your control.

提交回复
热议问题