swift tableview的分割线不能到头
1,设置tableview的separatorInset, layoutMargins
if(myTableView.respondsToSelector("setSeparatorInset:")) {
myTableView.separatorInset = UIEdgeInsetsMake(, , , )
}
if(myTableView.respondsToSelector("setLayoutMargins:")) {
myTableView.layoutMargins = UIEdgeInsetsMake(, , , )
}
2,设置cell的separatorInset, layoutMargins
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
if(cell.respondsToSelector("setSeparatorInset:")) {
cell.separatorInset = UIEdgeInsetsMake(, , , )
}
if(cell.respondsToSelector("setLayoutMargins:")) {
cell.layoutMargins = UIEdgeInsetsMake(, , , )
}
}
swift tableview的分割线不能到头的更多相关文章
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
IOS8 设置TableView Separatorinset 分割线从边框顶端开始 在ios8上 [TableViewsetSeparatorInset:UIEdgeInsetsMake(0,0 ...
- swift语言学习之UITableView分割线左边到头的解决
此方法兼容ios 7.8.9 // 在tableView创建地方设置 if tableView!.respondsToSelector("setSeparatorInset:") ...
- 模拟器的tableView的分割线不显示
只有iOS9和iPhone6 plus模拟器上TableView分割线不会显示. 原因: 由于iPhone6 plus的分辨率较高,开发的时候同常都使用command + 3 或者 command + ...
- ios8 ios7 tableview cell 分割线左对齐
ios8中左对齐代码 //加入如下代码 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cel ...
- 设置tableView的分割线填满cell的方式总结
方式一:cell的底部添加一个UIView 1.在tableViewController的viewDidLoad中取消系统的分割线 // 取消系统的分割线 self.tableView.separat ...
- swift - tableView数据向上收缩动画
// // TTTableViewController.swift // tableVIewAnimation // // Created by su on 15/12/11. // Copy ...
- IOS tableView 去除分割线 和 不允许选中表格cell
//去除分割线 self.tableView.backgroundColor=[UIColor colorWithRed:///255.0 alpha:1.0]; self.tableView.sep ...
- UI控件自定义tableView的分割线的样式
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFi ...
- iOS TableView的分割线
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { [self.tableView setSeparato ...
随机推荐
- 收藏的 500多个开源的Git源码
由dkhamsing发起的Open-Source iOS Apps收集了各种开源的iOS App,并进行了详细的分类,比如游戏.社交.健康.键盘.定位.多媒体.新闻.办公.安全以及小工具类等.截至目前 ...
- KMP详解
原文: http://blog.csdn.net/v_july_v/article/details/7041827 从头到尾彻底理解KMP 1. 引言 本KMP原文最初写于2年多前的2011年12月, ...
- configure: error: no acceptable C compiler found in $PAT 的解决方案
configure: error: no acceptable C compiler found in $PATH See `config.log' for more details.你的机器里没有安 ...
- 《photon中配置lite的相关问题》
前几天在学习photon的时候发现了一个问题: 无论如何都找不到Lite文件夹,我是一个新手这也是写给那些新上手的朋友: 首先下载SDK以后配置完成后无论如何都找不到Lite文件夹和相关的Lite.d ...
- swift 如何给tabBarItem的相关设计
//设置tabBarItem的title,以及点击和不点击状态图片 self.tabBarController.tabBarItem = UITabBarItem(title: "投资理财& ...
- 如何防止JAVA反射对单例类的攻击?
在我的上篇随笔中,我们知道了创建单例类有以下几种方式: (1).饿汉式; (2).懒汉式(.加同步锁的懒汉式.加双重校验锁的懒汉式.防止指令重排优化的懒汉式); (3).登记式单例模式; (4).静态 ...
- javascript变量问题
CMAScript变量包含两种不同数据类型的值: 基本类型值:简单的数据段:引用类型值:可能有多个值构成的对象. 5种基本类型:Undefined,Null,Bollean,Number,String ...
- JBoss CLI
转自http://www.cnblogs.com/inteliot/archive/2012/08/05/2623719.html 为 了便于维护和管理, JBoss AS 7 提供了命令行接口( ...
- Python学习之路--进程,线程,协程
进程.与线程区别 cpu运行原理 python GIL全局解释器锁 线程 语法 join 线程锁之Lock\Rlock\信号量 将线程变为守护进程 Event事件 queue队列 生产者消费者模型 Q ...
- 获取google翻译的音频文件_合并音频文件的方法
1. 把引文输入google 翻译,然后点击"朗读"