我正在从网上下载一个文件。当我恢复文件的下载时,它会从起点重新启动,而不是从我暂停下载的点重新启动。我在暂停下载时保存了下载文件的值。但现在我无法恢复我暂停的文件的下载。我正在使用此代码下载新文件
url = [NSURL URLWithString:_item.link];
_receivedBytes = 0;
_speed = 0;
_lastTime = [[NSDate date] timeIntervalSince1970];
_connection = [ASIWebPageRequest requestWithURL:url];
[_connection setUrlReplacementMode:ASIReplaceExternalResourcesWithData];
[_connection setDelegate: self];
[_connection setDownloadProgressDelegate:self];
[_connection setDownloadCache:[ASIDownloadCache sharedCache]];
[_connection setDownloadDestinationPath: _item.path];
[_connection startAsynchronous];