- (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. BZOJ_3963_[WF2011]MachineWorks_斜率优化+CDQ分治

    BZOJ_3963_[WF2011]MachineWorks_斜率优化+CDQ分治 Description 你是任意性复杂机器公司(Arbitrarily Complex Machines, ACM) ...

  2. The Castle

    链接 分析:先暴力求出联通块数和最大联通块包含多少,接着对于每个位置判断去掉其上下左右的四个位置的墙之后的最大联通块数,并且记得先选最西,然后选最南的顺序了来输出 /* PROB:castle ID: ...

  3. Name That Number

    链接 分析:找出每一个字母对应的数字,然后看字典里面那个与其匹配 /* ID: **** PROG: namenum LANG: C++ */ #include<iostream> #in ...

  4. RadioGroup和RadioButton

    Activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&qu ...

  5. U3D Navigation

    让我们来一起粗步认识一下NavMesh的简单使用 首先我们建立一个新场景,在新场景我们创建 一个地形或者创建一个Plane, 然后在其上面用Cube或者其它的建立一些障碍物 再创建自己需要为其设置自动 ...

  6. 聊聊Spring中的工厂

    BeanFactory是Spring IOC容器的根接口,定义了Bean工厂的最基础的功能特性,比如根据name获取指定bean等,根据不同用途它的子接口又对它的功能进行细化,比如是否是可列表的,是否 ...

  7. C. Vanya and Scales

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  8. 洛谷 - P2280 - 激光炸弹

    https://www.luogu.org/problemnew/show/P2280 二维前缀和差分的模板题.注意学习二维前缀和的求法,不用又down又right的. #include<bit ...

  9. Thirft 客户端等待时间

    thrift框架使用C++ thrift shows CLOSE_WAIL error thrift中TNonblockingServer的简单用法

  10. PJzhang:lijiejie的敏感目录爆破工具BBScan

    猫宁!!! 参考链接: https://www.freebuf.com/sectool/85729.html https://segmentfault.com/a/1190000014539449 这 ...