设置table分割线靠左边0距离对齐
2015-09-01 17:46
211 查看
在viewDidload 加下面代码
if ([self.table respondsToSelector:@selector(setSeparatorInset:)]) { [self.table setSeparatorInset:UIEdgeInsetsZero]; } if ([self.table respondsToSelector:@selector(setLayoutMargins:)]) { [self.table 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]; } }
相关文章推荐
- [转]ArcGIS Runtime SDK For Android 授权方法(去除水印)
- 使用Axure RP原型设计实践08,制作圆角文本框
- angularjs filter 详解
- ref和out的用法说明举例(转)
- ecshop调用后台指定广告位下所有广告循环
- C 截取输出
- 新人开博,自娱自乐一下。
- 从零开始写个编译器吧 - 单词化简述(Tokenization)
- 属性资源与Android命名空间
- node.js中npm安装的模块在哪个目录下
- MD5加密代码
- From Eclipse to intellij idea 14
- android 无法生成R文件的原因
- 怎么进入 BAT 的研发部门?
- 54.OC与js交互
- 求子树中含有苹果的节点个数 时间戳+树状数组 poj 3321
- java.net.UnknownHostException: sms.chinacomservice.net
- 产品经理小技术:图片素材随手找,原型设计快又好
- shell 数组建立及使用技巧
- 53。XCode:duplicate symbol _base64_encode in--引用库重复定义的问题