Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

99miles

macrumors member
Original poster
Oct 10, 2008
50
0
I have a TableView of type: UITableViewStyleGrouped

In viewForHeaderInSection I return a UILabel:

UILabel* hdr = [[[UILabel alloc] initWithFrame:CGRectMake(40, 0, 280, 40)] autorelease];
hdr.opaque = YES ;
[hdr setTextColor:[UIColor whiteColor]];
UIFont *textHeaderFont = [UIFont fontWithName:mad:"Arial-BoldMT" size:16];
hdr.font = textHeaderFont;
hdr.backgroundColor = [UIColor clearColor];
hdr.text = @"title";
return hdr ;

... but it is not indented. It's x location is 0.

If I return a UITableViewCell the header is indented but there's about a 1 pixel white space just below it.

I can't figure out how to solve either problem. Any ideas?
Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.