UITableView的分割线去除左侧15像素从最左边开始绘制
2016-01-13 11:59
621 查看
在ios7 加上这句
ios8的话,需要重写这个方法
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { [tableView setSeparatorInset:UIEdgeInsetsZero]; }
ios8的话,需要重写这个方法
- (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]; } }
相关文章推荐
- iOS UIDynamic动画
- UILabel的使用及常用属性的设置
- 限制UITextField输入字数(系统输入法候选输入同样适用)
- hdu 1005 Number Sequence
- 在唯一密钥属性“value”设置为“Service.svc”时,无法添加类型为“add”的重复集合项
- iOS UI 之UILable
- UI组件之TextView及其子类(五)计时器Chronometer
- 解决github push错误The requested URL returned error: 403 Forbidden while accessing
- KVO (Key-Value Observing) 实现机制
- iOS里面尽量的避免两件事情的耦合性--ui刷新不应该和任何的事情耦合
- UIImage和Base64格式图片相互转化!
- ios常见错误之 Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
- 解决集成支付宝报一堆warning: (arm64) /Users/scmbuild/workspace/standard-pay/.....警告问题
- UiAutomator——Android自动化测试工具简要介绍
- 【java】java 设计模式(4):建造者模式(Builder)
- 【已解决】finished with non-zero exit value 2
- The default for KeyValuePair
- Handler,Message,Looper & MessageQueue
- UI组件之TextView及其子类(四)AnalogClock,DigitalClock
- Android M 权限管理拿不到OnRequestPermissionsResult的回调