2011-02-24 184 views
1

当你调用[table reloadData];方法是否简单地回想起用于最初构建表格视图的两种方法:重新加载UITableView

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{ 
return tableLength; 
} 


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
return cell; 
} 
+1

很简短的回答:是的,这是应该发生的。 – 2011-02-24 23:58:21

+0

详细解释问题 – devsri 2011-02-25 11:05:47

回答

0

是的,这是正确的。它也称为方法:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
+0

注意:这是问题中列出的方法之一。 – 2011-02-25 12:29:06

2

是的,就是这样。你还期望它做什么?