Iphone MGTwitterEngine和TableView
我想我更了解MGTwitterEngine是如何返回的。但是我仍然在做一些错误的事情,以便将它放到我的表视图中。这是我的CellForRowatineXpath方法中的内容:Iphone MGTwitterEngine和TableView,iphone,objective-c,uitableview,Iphone,Objective C,Uitableview,我想我更了解MGTwitterEngine是如何返回的。但是我仍然在做一些错误的事情,以便将它放到我的表视图中。这是我的CellForRowatineXpath方法中的内容: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [self.tableView dequeueReusable
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"Default"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"Default"] autorelease];
}
NSDictionary *record = [NSDictionary dictionaryWithContentsOfFile:[twitterEngine getUserTimelineFor:username since:nil count:20]];
cell.text = [record valueForKey:@"text"];
return cell;
}
我做错了什么?谢谢getUserTimelineFor:since:count:不返回推文列表。它执行一个异步调用,并尝试下载信息。此操作是否成功将与指定为引擎委托的对象通信,并实现MGTwitterEngineedElegateProtocol
换句话说,您需要更多地了解委托模式。我完全忽略了委托方法及其功能。MGTwitterEngine比我最初想象的更强大。有效的方法是使用did get statusreceived方法从返回的数组创建一个数组。不,Dave,我很理解它们,只是看得不够近。