views:

35

answers:

0

I am writing an iPhone application, and I need to download files in the background. I can handle the download files part, but I am not so sure about the background part. My current idea is to use a run loop to wait until the user selects a file to download. This appears to work, but a run loop exits if no input source is set. However, Apple docs say something about a predefined custom input source allowing you to use the function
performSelector:onThread:withObject:waitUntilDone:
to run a function. I would like to know how to add that input source to the run loop.