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的分割线不能到头的更多相关文章

  1. IOS8 设置TableView Separatorinset 分割线从边框顶端开始

    IOS8 设置TableView Separatorinset 分割线从边框顶端开始   在ios8上 [TableViewsetSeparatorInset:UIEdgeInsetsMake(0,0 ...

  2. swift语言学习之UITableView分割线左边到头的解决

    此方法兼容ios 7.8.9  // 在tableView创建地方设置 if tableView!.respondsToSelector("setSeparatorInset:") ...

  3. 模拟器的tableView的分割线不显示

    只有iOS9和iPhone6 plus模拟器上TableView分割线不会显示. 原因: 由于iPhone6 plus的分辨率较高,开发的时候同常都使用command + 3 或者 command + ...

  4. ios8 ios7 tableview cell 分割线左对齐

    ios8中左对齐代码 //加入如下代码 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cel ...

  5. 设置tableView的分割线填满cell的方式总结

    方式一:cell的底部添加一个UIView 1.在tableViewController的viewDidLoad中取消系统的分割线 // 取消系统的分割线 self.tableView.separat ...

  6. swift - tableView数据向上收缩动画

    // //  TTTableViewController.swift //  tableVIewAnimation // //  Created by su on 15/12/11. //  Copy ...

  7. IOS tableView 去除分割线 和 不允许选中表格cell

    //去除分割线 self.tableView.backgroundColor=[UIColor colorWithRed:///255.0 alpha:1.0]; self.tableView.sep ...

  8. UI控件自定义tableView的分割线的样式

    - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFi ...

  9. iOS TableView的分割线

    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { [self.tableView setSeparato ...

随机推荐

  1. Linux Oracle删除归档日志

    今天遇到Oracle报这样的错:ORA-00257 查看了下,原来是Oracle的归档日志满了,解决方案两个 一:增加归档日志大小 二:删除无用的归档日志(我们选择这个方案) 什么也不说了Linux下 ...

  2. 在app中打开appStore中其他app

    var str = "https://itunes.apple.com/cn/app/zhang-jiange-hao-tou-zi-ke/id402382976?mt=8"//这 ...

  3. winfrom调用FastReport模板

    '存放模板的路径 If Dir(Application.StartupPath & "\ReportsFile\HB\01\IN.frx", FileAttribute.N ...

  4. 自定义actionbar标题

    这是我自己封装的一个activity,主要作为所有Activity的基类,可以一键关掉所有的activity, 并共享一个自定义actionbar.直接切入主题吧. 第一步就是创建自定义标题的布局文件 ...

  5. spring batch部分

    引用高人的:http://kanpiaoxue.iteye.com/blog/1768887

  6. Fix git 提交代码错误

    今天用git clone下代码,修改,push提交,发现以下错误 [root@localhost gocache]# git push origin master error: The request ...

  7. Windows 10 for phone 离我们不远了

    今天登录Windows Insider终于看到更多机型可以更新预览版了,看来Windows phone 10离我们不远了!

  8. iOS开发流程总结

    本文由社区会员umyueyue分享 以下是会员umyueue总结的iOS开发流程以及学习中的资料分享. 流程:注册.开发.真机测试.发布以及上线. iPhone iOS 4从注册到app上线开发流程 ...

  9. nginx 配置rewrite 笔记

    nginx 配置rewrite笔记: 通过下面的示例来说明一下,1. 先说说location : location 表示匹配传入的url地址,其中配置符有多种,各种情况的意义不一样: location ...

  10. Android学习地址

    Google Android官方培训课程中文版http://hukai.me/android-training-course-in-chinese/