내 테이블보기에 4 개의 섹션이 있습니다. 모든 섹션의 머리글을 추가하는 방법은 다음과 같습니다. 그러나 그 코드는 작동하지 않습니다.표의 각 섹션에 대한 머리글 제목을 추가하십시오.
코드에 따라- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection: (NSInteger)section {
if (section == 0)
return @"Tasks";
if (section == 1)
return @"Appointments";
if (section == 2)
return @"Activities";
if (section == 3)
return @"Inactivities";
}