请教,如何设置table中tableview 字体大小小

IOS(371)
在改变tableview的背景颜色后,head的颜色往往很难看,如何修改之?
实现函数-(UIView&*) tableView:(UITableView&*)tableView viewForHeaderInSection:(NSInteger)section
示例代码如下:
-(UIView&*) tableView:(UITableView&*)tableView viewForHeaderInSection:(NSInteger)section
// UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 38)] autorelease];
// [headerView setBackgroundColor:[UIColor colorWithRed:149/255.0 green:255/255.0 blue:255/255.0 alpha:1.0]]; &
// return headerV
UILabel&*headerLabel = [[[UILabel&alloc]initWithFrame:CGRectMake(0,&0,
tableView.bounds.size.width,38)]autorelease];
if&(section ==&0) {
headerLabel.text&=&@&headAAAAAAA&;
headerLabel.text&=&@&headBBBBBBB&;
&//[headerLabel setFont:[UIFont fontWithName:@&Helvetica& size:18.0]];
&[headerLabel&setFont:[UIFont&boldSystemFontOfSize:18.0]];
[headerLabel&setTextColor:[UIColor&whiteColor]];
[headerLabel&setBackgroundColor:[UIColor&clearColor]];
return&headerL
下面这个函数仅仅是设置head的title...
-(NSString&*) tableView:(UITableView&*)tableView titleForHeaderInSection:(NSInteger)section
if&(section ==&0) {
return&@&headAAAAAAA&;
return&@&headBBBBBBB&;
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:126350次
积分:2412
积分:2412
排名:第12125名
原创:34篇
转载:378篇
(1)(1)(3)(1)(1)(2)(2)(3)(1)(3)(1)(1)(2)(1)(2)(2)(3)(7)(1)(1)(1)(4)(14)(5)(10)(20)(26)(77)(44)(37)(88)(30)(17)本帖子已过去太久远了,不再提供回复功能。

我要回帖

更多关于 tableview 字体大小 的文章

 

随机推荐