【发布时间】:2011-06-22 21:50:04
【问题描述】:
直接设置tableHeaderView/tableFooterView属性有什么区别:
UIView *headerView = [[UIView alloc] init...];
tableView.tableHeaderView = headerView;
[headerView release];
并实现 viewForHeaderInSection/viewForFooterInSection 方法?:
- (UIView *)tableView:(UITableView *)tableView
viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[[HeaderView alloc] init...] autorelease];
return headerView;
}
【问题讨论】:
标签: objective-c ios cocoa-touch uitableview