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 ...
随机推荐
- Javascript日期比较
var date1=Date.parse("2014-9-3 11:40:14".replace(/-/g,"/")); var date2=Date.pars ...
- [ MySql学习心得 ] --Two
五.MySql 中常用子句 1.where子句 我们都知道在查询数据时,未必会查整个表中的数据,当有条件查询时,就会用到where子句.其结构: select * from [表名] where ...
- linux环境下部署tomcat
服务器环境:Red Hat Enterprise Linux Server release 6.5 安装部署包:apache-tomcat-8.0.30.tar.gz.jdk-8u66-linux-x ...
- 可维护的javascript
理论上我只能把序看完....... 第一章:基本的格式化 1.1:JSLint,JSHint查找代码中潜在的错误. 1.2:缩进:空格(2,4,8没有兼容性)和tab(不同的编辑器展现不一样),在编辑 ...
- step by step 之餐饮管理系统六(数据库访问模块)
距上次写的博客已经好几个月,一方面公司里面有很多的东西要学,平时的时候又要写代码,所以没有及时更新,不过现在还好,已经成型了,现在把之前的东西贴出来,先看一下现在做的几个界面吧.第一个界面是用颜色用区 ...
- <转>简单之美——系统设计黄金法则
作者: 包云岗 发布时间: 2012-05-19 13:06 阅读: 3036 次 推荐: 1 原文链接 [收藏] 最近多次看到系统设计与实现的文章与讨论,再加上以前读过的其他资料以及自 ...
- 『TCP/IP详解——卷一:协议』读书笔记——13
2013-08-24 16:03:39 4.6 ARP代理 ARP代理(Proxy ARP):如果ARP请求是从一个网络的主机发往另一个网络上的主机,那么连接这两个网络的路由器就可以回答该请求.这样可 ...
- [Leetcode][JAVA] Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- How to create Web Deployment Package and install the package
Create Web Deployment Package To configure settings on the Connection tab In the Publish method drop ...
- jetty9 安装部署更改端口号
1.下载jetty 并解压到指定目录 2.更改默认端口号--在start.d中的http.ini中修改 3.启动服务 在jetty的根目录中输入命令 java -jar start.jar 服务就启 ...