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 ...
随机推荐
- K/3 Cloud开发之旅 -- 主页自定义篇(一)
如果说我们要进行主页自定义篇,首先涉及到的就是登陆的自定义,那么如何进行登录界面的自定义呢 其实登陆界面自定义主要就是图片的替换 ,那么我们就看下登陆界面的图片的组成 登录页面底图有两部分组成,一个是 ...
- win7/win8远程桌面 server 2003 卡的问题
原因在于从vista开始,微软在TCP/IP协议栈里新加了一个叫做“Window Auto-Tuning”的功能.这个功能本身的目的是为了让操作系统根据网络的实时性能(比如响应时间)来动态调整网络上传 ...
- 【转】mac os 安装php
安装PHP 添加brew的PHP扩展库: brew update brew tap homebrew/dupes brew tap josegonzalez/homebrew-php 可以使用brew ...
- BZOJ 1564: [NOI2009]二叉查找树
链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1564 Description Input Output 只有一个数字,即你所能得到的整棵树的访 ...
- java8 ArrayList源码阅读
转载自 java8 ArrayList源码阅读 本文基于jdk1.8 JavaCollection库中有三类:List,Queue,Set 其中List,有三个子实现类:ArrayList,Vecto ...
- Spring中获取数据库表主键序列
在程序开发中,我们经常有写数据库表的操作,数据表中经常带有主键自增序列,如何获取自增序列.spring中提供了相应的类 DataFieldMaxValueIncrementer. DataFieldM ...
- easyui datagrid中关联combox
datagrid中列上关联combobox{ field: 'SysCode', title: '系统代码', width: 150, align: 'left', editor: { type: ' ...
- template学习一函数模板
要点: 1.模板参数在实体化的时候不能自动类型转换,只有非模板函数才可以 例如: int max(int,int); template <class T> T max(T,T); 在调用的 ...
- (转)深度分析Linux下双网卡绑定七种模式
现在一般的企业都会 使用双网卡接入,这样既能添加网络带宽,同时又能做相应的冗余,可以说是好处多多.而一般企业都会使用linux操作系统下自带的网卡绑定模式,当然现在 网卡产商也会出一些针对window ...
- iOS-延时操作汇总
在iOS开发中,一个操作我们希望不要立刻执行,而是等上几秒之后再来处理,这时我们就需要延时处理,我们来看看这些方 1.最直接的方法performSelector:withObject:afterDel ...