I want to set header text for each section of my grouped UITableView.
I tried this code but get error "EXC_BAD_ACCESS"
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
if (tableView.tag==2)
{
if (section == 0)
{
return @"test1";
}
if (section == 1)
{
return @"test2";
}
}
}