Continue task execution in background

删除回忆录丶 提交于 2020-01-22 16:26:05

问题


Am I missing something here with Multitasking feature. I know we can execute a task in background, but what I really need is that task continues execution when app goes in background. So what I need is different than starting a new task in background. If images are being loaded in a view and user presses the home button to make the app go in background, I want that images continue to load and when user makes the app active again, he can see all the loaded images. How can this be done? Thanks a lot.


回答1:


Documentation on background task execution is on Apple's site in the iPhone Application Programming Guide.




回答2:


According to mentioned documentation, if you use beginBackgroundTaskWithExpirationHandler: while in foreground, it will keep executing in background until it ends. Once that task has ended, your application is eligible to be suspended.



来源:https://stackoverflow.com/questions/3215502/continue-task-execution-in-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!