Asynchronous downloading again
Asynchronous downloading again
- Subject: Asynchronous downloading again
- From: DKJ <email@hidden>
- Date: Sat, 31 Oct 2009 15:34:08 -0700
I've got a series of data files that my app needs to download before
the user can do anything. Because I want to have an activity indicator
spinning while the download is in progress, I have to do asynchronous
downloading. (Thanks to the list members who guided me to that
epiphany.) So I'm going to use the NSURLConnection class to do the
download.
Now I'm wondering if this will work: Suppose I want to download file1
and file2. (Again, the user can do nothing until both files are
downloaded.) I use NSURLConnection to download file1. Then in the
connectionDidFinishLoading delegate method, I do a synchronous
download of file2, with something like stringWithContentsOfURL.
My idea is that the synchronous download of file2 would be taking
place in a separate thread from the one that started the asynchronous
download of file1. So, from the first thread's point of view, file2 is
being downloaded asynchronously too.
Am I on the right track here? If so, it sure would simplify
downloading all those files.
dkj
P.S. It's time for my semi-anual global "Thank You" to all those list
members who've responded to my queries over the last six months.
THANK YOU!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden