开发者

Can i reduce the font size of iphone tableview header

开发者 https://www.devze.com 2022-12-11 08:56 出处:网络
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 ho开发者_运维问答w to

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 ho开发者_运维问答w to reduce the size, so that i can add the string to my table view header.

Thanks in advance, Shibin


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消