问题
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