iPhone 中的 Dropbox Api
我正在尝试将 dropbox 与 iphone 集成并使用登录选项完成。我想在登录后立即在表视图中加载根路径上的文件夹和文件。
代码是
- (void)viewWillAppear:(BOOL)animated {
[self.restClient loadMetadata:@"/"];
}
这个 loadMetadata 是 DBRestClient.m 类中的方法。我设法在控制台上打印 json 值
代码是
- (void)parseMetadataWithRequest:(DBRequest*)request {
NSAutoreleasePool* pool = [NSAutoreleasePool new];
NSDictionary* result = (NSDictionary*)[request resultJSON];
DBMetadata* metadata = [[[DBMetadata alloc] initWithDictionary:result] autorelease];
[self performSelectorOnMainThread:@selector(didParseMetadata:) withObject:metadata waitUntilDone:NO];
NSLog(@"Meta data is :%@",result);
[pool drain];
}
如何在视图控制器中使用此结果值以在表视图中显示它?
I am trying to integrate dropbox with iphone and done with login option.I want to load folders and files on root path in table view just after login.
code for this is
- (void)viewWillAppear:(BOOL)animated {
[self.restClient loadMetadata:@"/"];
}
This loadMetadata is method in DBRestClient.m class.I managed to print json value on console
Code is
- (void)parseMetadataWithRequest:(DBRequest*)request {
NSAutoreleasePool* pool = [NSAutoreleasePool new];
NSDictionary* result = (NSDictionary*)[request resultJSON];
DBMetadata* metadata = [[[DBMetadata alloc] initWithDictionary:result] autorelease];
[self performSelectorOnMainThread:@selector(didParseMetadata:) withObject:metadata waitUntilDone:NO];
NSLog(@"Meta data is :%@",result);
[pool drain];
}
How could I use this result value in my view controller to display this in tableview?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取目录的内容并将它们放入数组中。
不像将数组加载到
UITableView
中,就像任何其他NSArray / NSMutableArray
一样Get the contents of a directory and put them into an array.
Than load your array into your
UITableView
as you would any otherNSArray / NSMutableArray