我更好地理解MGTwitterEngine是如何返回的……我想。但是我仍然在做一些错误的事情来把它放到我的表视图中。这是我的cellforrowatindexpath方法中的内容:
- (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;}
我做错了什么?谢谢
发布于 2009-07-29 23:01:08
getUserTimelineFor: list :count:不返回tweet列表。它执行一个异步调用,然后停止并尝试下载信息。这是否成功将传递给被指定为引擎的委托的对象(并实现MGTwitterEngineDelegateProtocol)。
换句话说,您需要更多地了解委托模式。
发布于 2009-07-29 23:23:49
我完全忽略了委托方法和它们能做的事情。MGTwitterEngine比我最初想象的更强大。有效的方法是使用did get statusRecieved方法从返回的数组创建数组。
https://stackoverflow.com/questions/1203255
复制相似问题