Re: dataWithContentsOfURL
Re: dataWithContentsOfURL
- Subject: Re: dataWithContentsOfURL
- From: Angela Brett <email@hidden>
- Date: Fri, 9 Nov 2001 12:52:34 +1300
Hi
You have to implement
- (void)URLResourceDidFinishLoading:(NSURL *)sender
{
// 'sender' is the NSURL object you used for starting donwload
// use sender to use your data. For instance:
NSDictionary * tDict = [NSDictionary
dictionaryWithContentsOfURL:sender];
// if the data you got is a dictionary, or any
xxxWithContentsOfURL message of your class of interest.
}
I've just realised that's actually incorrect... it needs to be:
NSDictionary * tDict = [sender resourceDataUsingCache:YES];
or else the data will be loaded all over again in the
dictionaryWithContentsOfURL:sender.