私のテーブルビューには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";
}