UITableView 分割线贴近左端屏幕开始
2016-01-18 15:18
351 查看
- (void)viewDidLayoutSubviews{
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
}
if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableView setLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
}
}
- (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];
}
}
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];
}
if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableView setLayoutMargins:UIEdgeInsetsMake(0,0,0,0)];
}
}
- (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];
}
}
相关文章推荐
- 学习笔记:关于segue
- NGUI 相片循环滚动效果
- UI控件RecyclerView浅析
- 【django】request
- LeetCode Range Sum Query - Mutable
- UILabel根据文字计算高度在UItableview中的应用
- 《iOS Human Interface Guidelines》——HealthKit
- UIpickerView获得选中值
- XML hexadecimal value 0x__, is an invalid character
- 1367:[Baltic2004]sequence 左偏树
- UIALERT使用指南
- 将UIColor转换为RGB值
- 1月18号 UILabel 加上导入.tff格式的字体
- UITableView 状态栏返回顶部 和自定义按钮返回顶部
- 使用CForm类(Form builder)上传文件
- 自增量字段与Guid字段主键的性能对比
- PAT1099 Build A Binary Search Tree
- SQL Server 2016 实时查询统计(Live Query Statistics)
- ios基本控件之UITextView
- ios基本控件之UIView