Iphone 已调用numberOfRowsInSection,但未调用cellForRowAtIndexPath
在我的表格视图中,numberOfRowsInSection被调用了两次,但是cellforrowtaindexpath没有被调用吗?我想在tableView中显示Facebook好友列表(如果cellForRowAtIndexPath称我的问题已解决) 我在数组中得到了正确的值,但第一次调用table方法时,因为好友列表的解析未完成,它不会转到CellForRowatineXpath,但下次重新加载数据时,它显示值194(我在facebood中的好友)在行数部分中,但在索引路径中仍然没有进入单元格。我对那个问题感到很累Iphone 已调用numberOfRowsInSection,但未调用cellForRowAtIndexPath,iphone,ios,facebook,parsing,tableview,Iphone,Ios,Facebook,Parsing,Tableview,在我的表格视图中,numberOfRowsInSection被调用了两次,但是cellforrowtaindexpath没有被调用吗?我想在tableView中显示Facebook好友列表(如果cellForRowAtIndexPath称我的问题已解决) 我在数组中得到了正确的值,但第一次调用table方法时,因为好友列表的解析未完成,它不会转到CellForRowatineXpath,但下次重新加载数据时,它显示值194(我在facebood中的好友)在行数部分中,但在索引路径中仍然没有进入单
@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
@Stack.Blue:好的,您为tableView使用了什么属性??使用
@property(非原子,保留)UITableView*tableView代码>
或者,下一个选项是,您可以尝试在视图中添加表格将出现方法。请让我知道它是否有效。请在标题中总结问题。您提供的数据不足。在初始化表视图时,是否在方法中将委托设置为self在获取数据时重新加载有什么问题。。。每个人都这样做……问题的标题在我看来是:)@inderkumarratore问题是。我的[array count]在numberOfRowsInSection中打印164,但cellForRowAtIndexPath未执行谢谢。对我来说,是retain
关键字起了作用。在我的例子中,使用ARC,它是strong
关键字。