0
섹션이있는 UITableView
을 설정 중입니다. numberOfSectionsInTableView:
메서드가 제대로 호출되고 올바른 결과 (내 경우 3)를 반환하지만 titleForHeaderInSection
은 전혀 호출되지 않고 결과 테이블 뷰에는 행이 있지만 섹션은 포함되지 않습니다.UITableViewDataSource 프로토콜을 구현할 때 titleForHeaderInSection이 호출되지 않음
이 방법이 tableview에 의해 호출되는지 확인하는 방법이 있습니까?
- (NSString *) titleForHeaderInSection:(NSInteger)section
{
NSString *sectionHeader = nil;
if (section == 0)
{
sectionHeader = @"Alpha";
}
if (section == 1)
{
sectionHeader = @"Beta";
}
if (section == 2)
{
sectionHeader = @"Gamma";
}
NSLog(@"%@", sectionHeader);
return sectionHeader;
}