创建UILabel并将其设置为节页眉/页脚。随时更新UILabel。
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return sectionFooterView;
}
- (void)viewDidLoad {
// create sectionFooterView in Interface Builder, change the frame here
// use Font-size:15 , BG-Color: clearColor , text-Color: RGB=(97,105,118)
// and Text-alignment:Center to look like table view's original footer
sectionFooterView.frame = CGRectMake(0, 10, 320, 12);
}
- (void)changeFooter {
sectionFooterView.text = @"Footer";
}