- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    if (tableView == self.searchDisplayController.searchResultsTableView)
    {
        return nil;
    }
    UIView *headView = [[[UIView alloc]init]autorelease];
    headView.backgroundColor = [UIColor clearColor];
    if (section!=0)
    {
        //标题背景
        UIView *biaotiView = [[[UIView alloc]init]autorelease];
        biaotiView.backgroundColor = BB_White_Color;
        biaotiView.frame=CGRectMake(0, 0, 320, 30);
        [headView addSubview:biaotiView];
         
        //标题文字
        UILabel *lblBiaoti = [[[UILabel alloc]init]autorelease];
        lblBiaoti.backgroundColor = [UIColor clearColor];
        lblBiaoti.textAlignment = NSTextAlignmentLeft;
        lblBiaoti.font = [UIFont systemFontOfSize:15];
        lblBiaoti.textColor = [UIColor blackColor];
        lblBiaoti.frame = CGRectMake(15, 7.5, 200, 15);
        lblBiaoti.text = [headerList objectAtIndex:section-1];
        [biaotiView addSubview:lblBiaoti];
    }
    return headView;
}

IOStableviewsectionSet的更多相关文章

随机推荐

  1. 简易五子棋 V1.1.0

    main.cpp #include "fivechess.cpp" int main() { fivechess a; a.RunGame(); getchar(); return ...

  2. AM335x Android eMMC mkmmc-android.sh hacking

    # AM335x Android eMMC mkmmc-android.sh hacking # # . 有空解读一下android的分区文件. # . 代码来源:https://github.com ...

  3. SpringMVC之使用Validator接口进行验证

    对于任何一个应用而言在客户端做的数据有效性验证都不是安全有效的,这时候就要求我们在开发的时候在服务端也对数据的有效性进行验证.SpringMVC自身对数据在服务端的校验有一个比较好的支持,它能将我们提 ...

  4. May Challenge 2017

    Chef and his daily routine 分析:水题,设置优先级,判断如果后面小于前面就输出no #include "iostream" #include " ...

  5. bzoj 3073 Journeys —— 线段树优化连边

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3073 建两棵线段树,一棵从下往上连边,一棵从上往下连边,叶子节点之间也有连边: 区间向区间连 ...

  6. Bootstrap-CSS:表单

    ylbtech-Bootstrap-CSS:表单 1.返回顶部 1. Bootstrap 表单 在本章中,我们将学习如何使用 Bootstrap 创建表单.Bootstrap 通过一些简单的 HTML ...

  7. pl/sql 远程连接oracl服务器方法

    在Oracle/network/admin中的tnsnames.ora中添加对应的如下代码: LISTENER_ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = ...

  8. J20170507-ts

    プロンプト n. 提示 オブジェクト n. 对象 アスタリスク *  アンパサンド      & スラッシュ       / イテレータ    n 迭代器 差し詰め 当前 スペル spell ...

  9. E20170429-hm

    fold   n/v 折叠 ribbon n 色带 hover  n. 盘旋; 徘徊; vi犹豫 Roll over 打滚; 折:翻滚   pinch ピンチ 捏,掐; finger フィンガー sc ...

  10. python __builtins__ enumerate类 (21)

    21.'enumerate', 用于将一个可遍历的数据对象(如列表.元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在 for 循环当中. class enumerate(object ...