ios - BlackRaccoon 下载文件时出现错误 : unrecognized selector sent to instance 0xcd609f0

标签 ios objective-c unrecognized-selector blackraccoon

我正在使用 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/

相关文章:

ios - CAKeyframeAnimation动画开始没有第一帧(路径)

objective-c - 合并来自后台线程的更新后,NSFetchedResultsController 未触发委托(delegate)方法

ios - Objective-C . 追踪无法识别的选择器

ios - 无法识别的选择器发送到实例 ***

objective-c - 从库中调用类别方法时出现 "unrecognized selector sent to class"

ios - 以编程方式检测ios中的蓝色闪烁状态栏

ios - 从 View Controller 加载 Tabbar Controller

ios - 新的 iOS SDK 3.0,无需弃用 API 即可发布到用户墙

ios - 如何加快AppCode自动完成速度?

ios - 将值传回 DetailViewController