重新加载UITableView

时间:2011-02-24 23:55:14

标签: iphone cocoa-touch uitableview

当你调用[table reloadData]时;方法可以简单地回忆起最初构建表视图的两种方法:

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


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

2 个答案:

答案 0 :(得分:2)

是的,就是这样。你还有什么期望呢?

答案 1 :(得分:0)

是的,这是正确的。它还调用方法:

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