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;}IOStableviewsectionSet的更多相关文章
随机推荐
- HashSe、LinkedHashSet、TreeSet(java基础知识十七)
1.HashSet存储字符串并遍历 * 特点:无序.无索引.无重复 HashSet存储字符串并遍历 HashSet<String> hs = new HashSet<>(); ...
- springboot使用thymeleaf 解析异常
在使用springboot的过程中,如果使用thymeleaf作为模板文件,则要求HTML格式必须为严格的html5格式,必须有结束标签,否则会报错!解决办法如下: 1.你可以使用严格的标签,也就是每 ...
- cassandra cpp driver中bind list——用cass_statement_bind_collection函数
CassError insert_into_collections(CassSession* session, const char* key, const char* items[]) { Cass ...
- LA-3716(sort的神用)
题意: 给出两条长度均为n的NDA链A和B,找出一段最长的字串[l,r]使得该区域的突变位置不超过p%; 思路: sum[i]表示[1,i]中不相同的个数,可得表达式(sum[i]-sum[j])/( ...
- angularjs 获得当前元素属性
先用 console.log(this)查看下当前被点击元素的 this 属性,然后可以看见里面有个$index属性,该属性指向的就是DOM元素列表中当前被点击的那个DOM的下标,只需要使用this. ...
- codeforces round 422 div2 补题 CF 822 A-F
A I'm bored with life 水题 #include<bits/stdc++.h> using namespace std; typedef long long int LL ...
- Synchronized之四:Synchronized的可重入性
本文里面讲的是广义上的可重入锁,而不是单指JAVA下的ReentrantLock. 可重入锁,也叫做递归锁,指的是同一线程外层函数获得锁之后 ,内层递归函数仍然有获取该锁的代码,但不受影响.在JAVA ...
- opencord视频截图
参考:https://www.youtube.com/watch?v=Teu9jK6GF6s
- Dockerfile-HEALTHCHECK指令
Dockerfile中使用HEALTHCHECK的形式有两种: 1.HEALTHCHECK [options] CMD command 2.HEALTHCHECK NODE 意思是禁止从父镜像继承的H ...
- SCUT - 48 - 飞行员的配对方案 - 费用流
https://scut.online/p/48 一道二分图匹配,跑费用流就可以过了(其实最大流都可以了). #include<bits/stdc++.h> #define MAXN_ 5 ...