tableView 分割线的处理
有时候根据UI设计图的需要我们需要对原生的TableView分割线做靠左,靠右的操作
在下面这个方法中实现即可。
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 3 && indexPath.row == 1) {
[cell setSeparatorInset:UIEdgeInsetsMake(0, WIDTH, 0, 0)];
}
}
tableView 分割线的处理的更多相关文章
- 解决tableView分割线左边不到边的情况
//解决tableView分割线左边不到边的情况// if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {// ...
- TableView分割线从顶端开始
如果什么都不设置的话 分割线是从cell.textlabel处开始的 如果加上 [_myTableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0) ...
- oc TableView 分割线(separator)部分显示问题
问题:当TableView的cell不能显示完整个屏幕(屏幕有剩余),则没有显示cell的地方也会显示分割线,这不是我们想要的,正常情况下,如果没有cell则应没有分割线.如下图所示:左图为遇到问题, ...
- tableview分割线
默认分割线,左边不到屏幕: TableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 三种结构体样式: /** UITab ...
- iOS tableView分割线高度自定义
1.系统自带的集中分割线的形式 myTableView.separatorStyle=UITableViewCellSeparatorStyleNone;(这个是去掉所有分割线)可以通过这个来设置 2 ...
- swift 一句代码补全tableView分割线
1.swift实现分割线补全 swift一个大进步,只要设置tableView.separatorInset = UIEdgeInsets.zero即可补全分割线, 2.OC实现分割线补全 而在OC中 ...
- tableview 分割线置最左边的解决方法
首先在viewDidLoad方法加入以下代码: if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { [se ...
- iOS-修改TableView分割线样式
实现代码: myTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 有三种样式: UITableViewCellS ...
- 模拟器的tableView的分割线不显示
只有iOS9和iPhone6 plus模拟器上TableView分割线不会显示. 原因: 由于iPhone6 plus的分辨率较高,开发的时候同常都使用command + 3 或者 command + ...
随机推荐
- POJ 2352 数星星
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 53816 Accepted: 23159 Descripti ...
- python 数字格式化
第二种办法比较常用: %02d print '%02d' % 11
- 命令创建Vue
创建vue+webpack vue init webpack projectName 基础 Vue+webpack+Vux 新建文件命令 # install vue-cli npm install - ...
- react router @4 和 vue路由 详解(八)vue路由守卫
完整版:https://www.cnblogs.com/yangyangxxb/p/10066650.html 13.vue路由守卫 a.beforeEach 全局守卫 (每个路由调用前都会触发,根据 ...
- 利用FFMPEG命令进行文件分割
ffmpeg -ss 00:00:00 -i input.mp4 -c copy -t 60 output.mp4 -ss 表示视频分割的起始时间,-t 表示分割时长,同时也可以用 00:01:00表 ...
- nginx:负载均衡(三)分流策略
[1]轮询策略.轮询策略是最简单的策略,无脑配置,不考虑服务器的访问的能力.每个请求按照时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除 upstream www.daysn. ...
- linux-安装jdk以及tomcat
1.安装jdk 下载地址:www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html 将jdk下 ...
- PyCharm进行远程开发和调试linux服务器
简介: 或许我也应该迁移到linux环境去开发. 最近写的一些小东西,在wnidows上开发,在windows上调试,都很正常.可是一旦放进linux服务器,就歇菜了. 那么我们有什么办法处理这个wi ...
- Remove duplicates from array II
//Given a sorted array, remove the duplicates in place such that each element appear only // once an ...
- Cracking The Coding Interview5.1
//You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set a ...