iOS7情况下:

  tableView.separatorInset = UIEdgeInsetsZero;
iOS8、9情况下: 首先在viewDidLoad方法中加上如下代码:
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset: UIEdgeInsetsZero];
}
if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
[tableView setLayoutMargins: UIEdgeInsetsZero];
}
然后再加上这个方法:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}

最新文章

  1. JQM页面跳转,多种效果
  2. crontab 定时调度
  3. Visual Studio Online Integrations-Planning
  4. #import与@class的区别
  5. 【网络收集】Sql Server datetime 常用日期格式转换
  6. android源码编译环境的准备及编译之后使用emulator运行的方法 - 官方版
  7. 月見(つきみ) 夕(ゆう) SumiHui.墨虺
  8. SafeNet推出行业首款白盒password软件保护解决方式
  9. OSI模型第四层传输层--UDP协议
  10. 中兴iptv机顶盒破解教程图文:亲测中兴B760EV3、B860A、B860AV1.1完美安装应用!非ttl破解![转]
  11. 设置LISTControl控件某一行的背景和文字颜色
  12. window.open实现模式窗口
  13. 12、Java函数接口
  14. [js]js中函数传参判断
  15. 与C/C++关键字extern有关的原理
  16. 解决办法: RSA host key for [ip address] has changed and you have requested strict checking.
  17. 图论最短路——dijkstra
  18. 完整table
  19. 管理11gRAC基本命令 (转载)
  20. JavaScript设计模式—工厂模式

热门文章

  1. 移动端自动化环境搭建-Appium Client的安装和AppiumLibrary库的安装
  2. input 放大镜
  3. 账号控管:NIS服务器
  4. elasticsearch同义词及动态更新
  5. ConCurrent in Practice小记 (1)
  6. SDF文件的用途
  7. kindeditor富文本框,上传文件后,显示文件名称
  8. python之路-Day4
  9. jshint创建配置文件
  10. -moz-transform: rotate(-5deg);