2014-03-12 61 views
0

我想在DropBox中显示上传过程。文件已成功上传并显示路径。但问题是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; 
} 

FPGA实现的委托方法

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

    NSLog(@"%f",progress); 

} 
+0

而我假设你的NSLog确实返回适当的委托对象? –

+0

是的,它是self.viewcontroller –

回答

1

这听起来像你想看到上传进步,对不对?如果是这样,您需要实施uploadProgress,而不是loadProgress

+0

谢谢我使用错误的方法 –