zoukankan      html  css  js  c++  java
  • IOStableviewsectionSet

    - (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;
    }
  • 相关阅读:
    图片展示和上传需要注意的问题
    大数据技能学习
    C#100万条数据导入SQL SERVER数据库仅用4秒 (附源码)
    领导力
    .NetCore 三种生命周期注入方式
    Redis常见面试题
    .NET Core开发日志——Middleware
    编程的灵魂
    递推算法
    分治算法
  • 原文地址:https://www.cnblogs.com/wcLT/p/4674917.html
Copyright © 2011-2022 走看看