我怎么知道iPhone下载完成的时间?

时间:2010-05-15 20:55:48

标签: iphone download

我使用:

创建一个数组
NSURL *url = [NSURL URLWithString:@"http;//www.myadress.myplist.plist"];f

NSArray *tmp = [NSArray arrayWithContentsOfURL:url];

我如何知道下载完成的时间?

1 个答案:

答案 0 :(得分:3)

-[NSArray arrayWithContentsOfURL]是一种同步方法 - 线程将阻塞,直到下载完成。 (因此,在主线程上使用它通常是一个坏主意 - 要么在单独的线程上使用它,要么使用异步NSURLConnection方法。

相关问题