iOS 如何改变表视图分割线在iOS7中的默认偏移
2024-08-30 14:27:07
- (void)viewDidLoad
{
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)])
{
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)])
{
[self.tableView 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];
}
}
最新文章
- spring 整合 mongo
- Linux链接库三(C跟C++之间动态库的相互调用)
- HTML5 - 使用<;video>;播放视频
- Model&;Animation
- java多线程为什么要用while而不是if
- easyui源码翻译1.32--Window(窗口)
- linux下查看和设置软件的安装路径
- APPIUM安装与搭建Q&;A
- Codeforces-8VC Venture Cup 2016-Elimination Round-626A.暴力 626B.水题 626C.二分
- C语言链表:逆序建立单链表
- docker常用操作备忘
- 转 MySQL 日期类型详解
- BZOJ3560 DZY Loves Math V 数论 快速幂
- Java面试知识点
- PAT 乙级 1061. 判断题(15)
- 在局域网内部实现远程web终端服务
- 记录一个错误,在bundle install时候出现 shoulda-mathcers bundle install fails with git error
- Pycharm(三)常用设置
- [BAT]批处理脚本双击可运行,但在定时计划任务中无法执行(当前工作路径不对导致的)
- canvas里调用getImageData的报security的问题