ios8 ios7 tableview cell 分割线左对齐
2015-01-10 09:05
393 查看
ios8中左对齐代码
ios7中左对齐代码
如果在ios7中使用nib或者storyboard可通过下图把Separator Insets的模式改为Custom,并且把Left的15改为0 转载请注明:天狐博客 » iOS7 tableview separatorInset cell分割线左对齐
![](http://images.cnitblog.com/blog/333700/201501/100903243752493.jpg)
以上内容分别引用 http://blog.sina.com.cn/s/blog_5da93c8f0101qgdz.html http://roybaby.blog.51cto.com/1508945/1558182
//加入如下代码 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { [tableView setSeparatorInset:UIEdgeInsetsZero]; } if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) { [tableView setLayoutMargins:UIEdgeInsetsZero]; } if ([cell respondsToSelector:@selector(setLayoutMargins:)]) { [cell setLayoutMargins:UIEdgeInsetsZero]; } }
ios7中左对齐代码
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { self.tableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0); }
如果在ios7中使用nib或者storyboard可通过下图把Separator Insets的模式改为Custom,并且把Left的15改为0 转载请注明:天狐博客 » iOS7 tableview separatorInset cell分割线左对齐
![](http://images.cnitblog.com/blog/333700/201501/100903243752493.jpg)
以上内容分别引用 http://blog.sina.com.cn/s/blog_5da93c8f0101qgdz.html http://roybaby.blog.51cto.com/1508945/1558182
相关文章推荐
- iOS8 tableview separatorInset cell分割线左对齐,ios7的方法失效了
- iOS8 tableview separatorInset cell分割线左对齐,ios7的方法失效了
- iOS7 tableview separatorInset cell分割线左对齐
- iOS7 tableview separatorInset cell分割线左对齐
- iOS7 tableview separatorInset cell分割线左对齐
- IOS-52-UITableView中cell分割线左对齐(解决iOS8版本适配问题)
- IOS7 IOS8 tableview分割线的不能顶左边的处理方式
- iOS7 tableview separatorInset cell分割线左对
- iOS7,iOS8,TableViewCell分割线不顶格,在ViewController里面加上下面的俩个方法即可
- 小胖说事38----tableview:ios7 分割线短 15 像素(废弃) ios8方法如何将分割线还原
- ios tableview 那些事(二十) ios7 分割线短 15 像素(废弃) ios8方法
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
- 实现iOS7上tableView的分割线像iOS6中的效果
- iostableView cell默认分割线的去除
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
- IOS8 设置TableView Separatorinset 分割线从边框顶端开始
- iOS8 设置tableView的分割线
- 关于TableView去掉cell最后一个分割线