[self tableView:self.tableView titleForHeaderInSection:section]
을 사용하여 제목을 검색하려고했지만이 질문을 게시 한 후 신속하게 super
에서 호출되어야한다는 것을 알았습니다. 따라서 :
[super tableView:self.tableView titleForHeaderInSection:section]
.
헤더하여 정의 할 수
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
NSString *title = [super tableView:self.tableView titleForHeaderInSection:section];
if (title.length == 0) return nil;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)];
label.textColor = [UIColor whiteColor];
label.backgroundColor = [UIColor clearColor];
label.text = title;
return label;
}