[英]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.