繁体   English   中英

DropBox委托方法没有被调用?

[英]DropBox delegate methods not being called?

我想在DropBox中显示上传过程。 文件已成功通过路径上传。 但是问题是Dropbox委托方法没有调用。

[[self restClient] uploadFile:@"1.png" toPath:@"/" withParentRev:nil fromPath:[[NSBundle mainBundle] pathForResource:@"Default" ofType:@"png"]];
    NSLog(@"%@",[self restClient].delegate);


  - (DBRestClient *)restClient {
    if (!restClient) {
        restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
        restClient.delegate = self;
    }
    return restClient;
}

委托方法的实现

 - (void)restClient:(DBRestClient*)client loadProgress:(CGFloat)progress forFile:(NSString*)destPath;{

    NSLog(@"%f",progress);

}

听起来您想查看上传进度,对吗? 如果是这样,则需要实现uploadProgress ,而不是loadProgress

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM