UITableView的Separator 绘制问题
2015-12-25 17:32
204 查看
如何让系统UItableview的分割线从最左边开始绘制。 在tableview的代理方法 willDisplay: 方法中写下如下代码:
亲测可用!
- (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]; } }
亲测可用!
相关文章推荐
- Touch Events and UIResponder
- UIView常用的一些方法小记之setNeedsDisplay和setNeedsLayout
- UI 和图片相关的知识点
- UISearchBar
- UI中系统自定的的宏定义-----数字
- iOS获取手机的UUID
- esasyui 和 KindEditor 在同一页面,input无法获得焦点,无法输入
- webdriver UI自动化测试执行JS脚本
- 代码手写UI,xib和StoryBoard间的博弈,以及Interface Builder的一些小技巧
- 22个值得收藏的android开源码-UI篇
- Android线程模型--在子线程中更新UI
- Loadrunner中参数化实战(1)-Sequential+Each iteration
- Java GUI
- Android ui 测试课堂笔记
- requestLayout和invalidate方法的区别
- Servlet(Response,Request)
- Android ui 测试课堂笔记
- Java UUID
- 使用burpsuite_pro_v1.6破解版暴力破解实例
- leetcode -- Range Sum Query 2D - Immutable -- 简单DP题目