0

I have tried it with

    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 100)];
    headerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
    headerView.opaque = NO;
    headerView.backgroundColor= [UIColor blackColor];


    return [headerView autorelease];
}

But how can i set a BackgroundImage to the sections?

Thanks much

Charles
  • 50,943
  • 13
  • 104
  • 142
user1431608
  • 1
  • 1
  • 2

1 Answers1

0

You can set the background colour to a pattern with image:

headerView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"myBackground.png"]];
J_D
  • 3,526
  • 20
  • 31