UITableViewCell里面separator的设置
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)])
{
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)])
{
[self.tableView setLayoutMargins:UIEdgeInsetsZero];
}
}
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
CGContextFillRect(context, rect);
//上分割线
CGContextSetStrokeColorWithColor(context,[UIColor whiteColor].CGColor);
CGContextStrokeRect(context,CGRectMake(,,rect.size.width,));
//下分割线
CGContextSetStrokeColorWithColor(context,[UIColor whiteColor].CGColor);
CGContextStrokeRect(context,CGRectMake(,rect.size.height-,rect.size.width,));
}
UITableViewCell里面separator的设置的更多相关文章
- UITableViewCell的separator分隔线设置失效
// 处理separator -(void)viewDidLayoutSubviews { if ([self.tableView respondsToSelector:@selector(setSe ...
- iOS边练边学--UITableViewCell的常见属性设置
// 取消选中的样式(常用) 让当前 cell 按下无反应 cell.selectionStyle = UITableViewCellSelectionStyleNone; // 设置选中的背景色,U ...
- hadoop streaming怎么设置key
充分利用hadoop的map输出自动排序功能,能够有效提高计算效率.Hadoop streaming框架默认情况下会以'/t’作为分隔符,将每行第一个'/t’之前的部分作为key,其余内容作为valu ...
- iOS:UITableViewCell自定义单元格
UITableViewCell:自定义的单元格,可以在xib中创建单元格,也可以在storyBorad中创建单元格.有四种创建方式 <1>在storyBorad中创建的单元格,它是静态的单 ...
- swift学习之UITabelView ----UITableViewCell
// // OneViewController.swift // tab // // Created by su on 15/12/7. // Copyright © 2015年 tian. ...
- iOS - UITableViewController
前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UITableView : UIScrollView <NSCoding> @available(iOS ...
- sqlite3 shell的使用
sqlite的安装 1. 首先是下载sqlite,可以该页面下载:http://www.sqlite.org/download.html 当前的最新版本为:sqlite-shell-win32-x86 ...
- IOS之未解问题--给UITableView提取UITableViewDataSource并封装瘦身失败
前言:阅读了<更轻量的 View Controllers>,发现笔者这个优化重构代码的想法真的很不错,可以使得抽取的UITableViewDataSource独立写在一个类文件里,并且也写 ...
- jQuery.FlexiGrid使用总结
经过对FlexiGrid的大量使用,及时不时琢磨下其代码,对她的脾性有了一定的了解,是该做总结的时候了. 一.FlexiGrid下载 1.原版代码 最近Paulo P. Marinas对FlexiGr ...
随机推荐
- 链表的C语言实现
#ifndef _CONST_H_#define _CONST_H_ #include <stdio.h>#include <stdlib.h> typedef enum { ...
- Xcode7 *** does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)
*** does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE ...
- 绝对炫的3D幻灯片-SLICEBOX
绝对炫的3D幻灯片-SLICEBOX http://www.jq22.com/jquery-info31
- 一个简单的JAVA C/S多线程应用
import java.net.*;import java.io.*;public class simpleServer{private static ServerSocket serverSoc ...
- [JS复习] JS 基础知识
项目结尾,空闲时间,又把<JS 基础知识> 这本书过了一遍,温故知新后,很多知其然不知其所以然的内容 豁然开朗. [1. 用于范围的标签] display :inline or bloc ...
- iOS - AppStores App 上架
前言 1.准备 开发者账号 完工的项目 2.上架步骤 1) 创建 App ID 2) 创建证书请求文件(CSR文件) 3) 创建发布证书(CER) 4) 创建 Provisioning Profile ...
- NodeJS 初体验
console.log('%s: %d', 'Hello', 25); // 可以像C语言格式一样输出//app.jsvar http = require('http');http.createSe ...
- Sql获取周、月、年的首尾时间。
,) -- 本周周一 ,,,)) -- 本周周末 ,) -- 本月月初 ,,,)) -- 本月月末 ,,) -- 上月月初 ,,)) -- 上月月末 ,) -- 本年年初 ,,,)) -- 本年年末 ...
- [WPF]ComboBox.Items为空时,点击不显示下拉列表
ComboBox.Items为空时,点击后会显示空下拉列表: ComboBox点击显示下拉列表,大概原理为: ComboBox存在ToggleButton控件,默认ToggleButton.IsChe ...
- Hbase关于Java常用API举例
1. HBase相关对Admin操作的的API封装在HBaseAdmin中,封装了HBase常用操作的API 使用方法: pom.xml <!-- https://mvnrepository.c ...