在我的 tableView numberOfRowsInSection被调用了两次但cellForRowAtIndexPath没有被调用?我想在 tableView 中显示 Facebook 好友列表(如果 cellForRowAtIndexPath 称我的问题已解决)。
我在这里的数组中得到了正确的值,但是第一次调用表方法时,因为好友列表的解析未完成,它不会转到cellForRowAtIndexPath但下次我重新加载数据时,它在numberOfRowsInSection中显示值 194(我的朋友在 facebood)但仍然没有去cellForRowAtIndexPath。我对这个问题感到很厌倦?
@implement RootViewController
//In this view i do two things. First use FBFeedPost to Fetch the Friend List from Facebook and Second navigate to FBFriends view
FBFeedPost *post = [[FBFeedPost alloc]initWithFriendList:self.imageView.image];
[post publishPostWithDelegate:self];
FBFriends *friendList=[[FBFriends alloc]initWithNibName:@"FBFriends" bundle:[NSBundle mainBundle]];
[[self navigationController] pushViewController:friendList animated:YES];
@end
@implement FBFeedPost
//After parsing friends list i pass Array to a FBFriend class function
FBFriends *obj1=[[FBFriends alloc]init];
[obj1 getFreindName:nameItems];
@end
@implement FBFriends
-(void)getFreindName:(NSMutableArray *)friendName
{
friendsArray=friendName;
NSLog(@"the count of name is %d",[friendsArray count]);// here i get right answer.
[self.tableView reloadData];
}
@end