How can i set png image with transparency for background of section's header in UiTableView?
+1
A:
I think you will need to create a UIView with a UIImageView in it.
Something like that :
- (void) createHeader
{
header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
header.backgroundColor = [UIColor colorWithWhite:0 alpha:0];
UIImageView *headerImage = [[UIImageView alloc] initWithImage:yourImage];
[header addSubview:headerImage];
[headerImage release];
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return header;
}
TheSquad
2010-08-06 10:25:37
Thank you,it works
S111
2010-08-06 17:41:32
great, don't forget to mark the thread as resolved ;-) have nice time coding...
TheSquad
2010-08-06 18:07:52