我正在使用 BlackRaccoon 从 FTP 服务器下载文件。以下是代码:
- (IBAction)download:(id)sender {
downloadData = [NSMutableData dataWithCapacity: 1];
downloadFile = [[BRRequestDownload alloc] initWithDelegate: self];
downloadFile.path = @"psnewsletter.pdf";
downloadFile.hostname = @"server";
downloadFile.username = @"user";
downloadFile.password = @"pswd";
[downloadFile start];
}
它给出了以下错误
2014-02-20 11:48:43.526 BlackHillPrimarySchool[2036:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MainViewController requestFailed:]: unrecognized selector sent to instance 0xcd609f0'
我们将不胜感激。
最佳答案
requestFailed:
是您必须在 View Controller 中实现的 BRRequest
委托(delegate)方法之一。
- (void)requestFailed:(BRRequest *)request {
BRRequestError *reqError = request.error;
// check the error, handle as needed.
}
我不确定你的代码是如何编译的。这是协议(protocol)必需的方法。
关于ios - BlackRaccoon 下载文件时出现错误 : unrecognized selector sent to instance 0xcd609f0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21895930/