我在表格視圖中有4個部分如何爲每個部分添加標題我正在編寫follwing代碼,但它不工作。爲表格中的每個部分添加標題標題
- (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";
}