Question

I need to reduce the font size of the table view header. My string value is a little bit longer and it doesnot fit in to the header. so planning to reduce the size. Any one knows how to reduce the size, so that i can add the string to my table view header.

Thanks in advance, Shibin

Was it helpful?

Solution

How do you currently set the string in your table view's header?

I'd imagine you are setting your table's header view to a UILabel object:

UILabel *headerLabel = [[[UILabel alloc] initWithFrame: CGRectMake(0, 0, 320, 50)] autorelease];
headerLabel.font = [UIFont systemFontOfSize: 14];
headerLabel.text = @"Nice and Long Table View Header Label String";
tableView.tableHeaderView = headerLabel;

Can you just set the label's font as above?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top