gpt4 book ai didi

iphone - 通过 View Controller 切换时应用程序崩溃

转载 作者:行者123 更新时间:2023-11-28 22:33:22 26 4
gpt4 key购买 nike

我正在使用 ASINetworkQueue 进行下载。我正在使用以下代码。

requestUserSpecificFileQueue = [ASINetworkQueue queue];
failed = NO;
// [requestUserSpecificFileQueue reset];
NSDictionary *dictLocal=[_objectArray objectAtIndex:bookViewSelected.tag];
UIProgressView *progressView=[[UIProgressView alloc]initWithFrame:CGRectMake(5, 190, 200, 20)];
[bookViewSelected addSubview:progressView];
[requestUserSpecificFileQueue setDelegate:nil];
[requestUserSpecificFileQueue setDownloadProgressDelegate:progressView];
[requestUserSpecificFileQueue setRequestDidFinishSelector:@selector(downLoadFinished:)];
[requestUserSpecificFileQueue setRequestDidFailSelector:@selector(downloadFailed:)];
[requestUserSpecificFileQueue setShowAccurateProgress:YES];
progressView.tag=bookViewSelected.tag;
[requestUserSpecificFileQueue setShouldCancelAllRequestsOnFailure:NO];
// requestUserSpecificFileQueue.name=[NSString stringWithFormat:@"%d",bookViewSelected.index];
ASIHTTPRequest *requestUserSpecificFile=[ASIHTTPRequest requestWithURL:[dict objectForKey:@"object"]];
requestUserSpecificFile.tag=bookViewSelected.tag;
[requestUserSpecificFile setDownloadDestinationPath:[[self returnUnzipBundlePathName] stringByAppendingPathComponent:dictLocal[@"fullLengthFilename"]]];

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
[requestUserSpecificFile setShouldContinueWhenAppEntersBackground:YES];
#endif
[requestUserSpecificFileQueue addOperation:requestUserSpecificFile];
[requestUserSpecificFileQueue go];

当我 pushViewcontroller 然后回来时,我的应用程序因 EXC_BAD_ACCSS 而崩溃应用程序在方法中崩溃--

[ASIHTTPRequest updateProgressIndicator:&downloadProgressDelegate withProgress:[self bytesDownloadedSoFar] ofTotal:[self totalBytesToDownload]];

最佳答案

ASIHTTPRequest 已弃用且不再维护,请使用 AFNetworking相反

关于iphone - 通过 View Controller 切换时应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16817700/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com