Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 解析、时间安排、表视图重新加载数据_Iphone_Ios_Facebook_Parsing - Fatal编程技术网

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

Iphone 解析、时间安排、表视图重新加载数据,iphone,ios,facebook,parsing,Iphone,Ios,Facebook,Parsing,我有三个类,我只是在tableView中显示我的Facebook好友。我成功地在一个friendArray中获得了我所有朋友的名字。我必须在FriendList类中显示朋友的姓名 1) RootViewController类 2) 友谊班 3) Facebook互动课程 我的问题是: 在抓取(解析)完成之前加载我的FriendList类。在我的数组中,friendArray计数为0。(因为(获取)解析未完成)。在我的控制台中,数组计数是150 friendListObject.friendArr

我有三个类,我只是在tableView中显示我的Facebook好友。我成功地在一个friendArray中获得了我所有朋友的名字。我必须在FriendList类中显示朋友的姓名

1) RootViewController类

2) 友谊班

3) Facebook互动课程

我的问题是:

在抓取(解析)完成之前加载我的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];
}

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

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

当解析器完成解析时,只需调用
[yourTable reloadData]