2014-03-12 168 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

謝謝我使用錯誤的方法 –