解析,时间安排,表视图重新加载数据

时间:2012-06-28 10:40:05

标签: iphone ios facebook parsing

我有三个课程,我只是在tableView中显示我的Facebook好友。我成功地把朋友的名字变成了朋友阿瑞。我必须在FriendList类中显示朋友姓名。

1)RootViewController类

2)FriendList类

3)Facebook互动课

我的问题是:

My FriendList类在获取(解析)之前加载完成。并且在我的数组中 friendArray计数为0.(因为(提取)解析未完成)。在我的控制台中,数组计数为150。

friendListObject.friendArray = parsedArray; // where get data

-(void)butoonClicked               
{
    FBFeedPost *post = [[FBFeedPost alloc]initWithFriendList:self.imageView.image];
    [post publishPostWithDelegate:self];
    FriendList *friendList=[[FriendList alloc]initWithNibName:@"FriendList" bundle:[NSBundle mainBundle]];
    [[self navigationController] pushViewController:friendList  animated:YES];
}

2 个答案:

答案 0 :(得分:0)

当您完成对facebook数据的解析时,您可以将朋友数组传递给类FriendList。这可以通过调用FriendList中的函数来完成。您可以使用此传递的数组填充friendListObject.friendArray并调用[tableview reloadData];

答案 1 :(得分:0)

UITableView有一个名为reloadData的方法来刷新自身及其所有数据源方法。

解析器完成解析后,只需调用[yourTable reloadData]即可。

相关问题