此代码有效:[self.tableView reloadData]
,但如果我扩展这样的loadView
方法UITableViewController
:
- (void) loadView {
[super loadView];
float headerHeight = 80;
UIView *tableV = self.tableView;
CGRect tableFrame = self.tableView.frame;
self.view = [[UIView alloc] initWithFrame:self.tableView.frame];
[self.view release];
tableFrame.origin.y += headerHeight - [UIApplication sharedApplication].statusBarFrame.size.height;
tableFrame.size.height -= headerHeight;
tableV.frame = tableFrame;
[self.view addSubview:tableV];
}
tableView 数据不会重新加载。我究竟做错了什么?