-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
}
Hi
I am very new in objective c..................
You may try folowing: Header with two customized labels
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:
(NSInteger)section {
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,
tableView.bounds.size.width, 22)];
NSString *dateStr = [[self.data allKeys] objectAtIndex:section];
CGFloat labelWidth = tableView.bounds.size.width / 2;
CGFloat padding = 5.0;
UILabel *labelOne = [[UILabel alloc] initWithFrame:CGRectMake
(padding, 0, (labelWidth - padding), 22)];
labelOne.backgroundColor = [UIColor clearColor];
labelOne.textAlignment = UITextAlignmentLeft;
labelOne.text = dateStr;
UILabel *labelTwo = [[UILabel alloc] initWithFrame:CGRectMake
(labelWidth, 0, (labelWidth - padding), 22)];
labelTwo.backgroundColor = [UIColor clearColor];
labelTwo.textAlignment = UITextAlignmentRight;
labelTwo.text = @"This is Label TWO";
[headerView addSubview:labelOne];
[headerView addSubview:labelTwo];
[labelOne release];
[labelTwo release];
return headerView;
}