[iOS UItableView 自定义Section] 自定义Section 修改title样式
来源:互联网 发布:有网络但是不能玩游戏 编辑:程序博客网 时间:2024/05/10 09:56
自定义Section
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ UIView *v = [UIView new]; v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, NEWWIDTH, 30)]; [v setBackgroundColor:[Common hexStringToColor:@"e4e4e4"]]; UILabel *labelTitle = [[UILabel alloc] initWithFrame:CGRectMake(15,0,v.width,v.height)]; [labelTitle setBackgroundColor:[Common hexStringToColor:@"e4e4e4"]]; labelTitle.textAlignment = NSTextAlignmentLeft; labelTitle.font = [UIFont systemFontOfSize:12]; labelTitle.textColor = [UIColor darkGrayColor]; if (section == 0) { labelTitle.text = @"乘车人"; }else if (section == 1){ labelTitle.text = @"订单信息"; } [v addSubview:labelTitle]; return v;}
直接返回Title的话
- (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ return @"lalalala"}
0 0
- [iOS UItableView 自定义Section] 自定义Section 修改title样式
- 自定义UITableView的Section的title的样式
- 自定义UITableView的Section的title的样式
- 修改UITableView section header title的样式
- 自定义Section:修改UITableView的Section的背景和字体
- 自定义Section:修改UITableView的Section的背景和字体
- UITableView自定义Section
- UITableView自定义Section
- 自定义UITableView的Section 的 title 的字体 和颜色
- tableview自定义每个section的title
- 表格的Section HeaderTitle 标题样式自定义
- 自定义uitabview section
- 自定义uitabview section
- 汇编-自定义section
- 设置UITableView Section的背景颜色和字体颜色-自定义Section
- IOS_设置UITableView Section的背景颜色和字体颜色(自定义section布局)
- ios 修改UITableView的section之间的距离
- iOS UITableView设置Section间距
- 一道Java相关的小程序题(一个无序数组里有99个不重复正整数,范围从......)
- 用Margin还是用Padding
- golang中并发sync和channel
- Queue Reconstruction by Height
- ANR机制以及问题分析
- [iOS UItableView 自定义Section] 自定义Section 修改title样式
- Android高效加载大图、多图解决方案,有效避免程序OOM
- Spring mvc 自定义时间转换器
- textArea没有value 属性 如何显示
- 多线程--原子类理解
- PHP自定义概率的方法(原创)
- 如何将数据转换libsvm格式文件
- 算法分析——Hanoi塔问题(还是写不出来啊!)
- AAAAAAA