UITableViewCell的分割线不满屏的解决办法
来源:互联网 发布:excel数据四舍五入取整 编辑:程序博客网 时间:2024/05/18 02:39
只需两步
1. - (void)viewDidLayoutSubviews {
if ([self.myTableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.myTableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.myTableView respondsToSelector:@selector(setLayoutMargins:)]) {
[self.myTableView setLayoutMargins:UIEdgeInsetsZero];
}
}
2. - (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];
}
}
效果如下:
1 0
- UITableViewCell的分割线不满屏的解决办法
- iOS7的cell分割线不满屏
- UITableViewCell分割线不到头的解决办法
- UITableViewCell的分割线
- iOS7的Cell的分割线宽度不满屏,解决方法
- iOS7的Cell的分割线宽度不满屏,解决方法
- iOS7的Cell的分割线宽度不满屏,解决方法
- iOS -- UITableViewCell的分割线
- UITableViewCell 多余的分割线不显示
- iOS UITableViewCell的分割线缩进
- 取消UITableViewCell的分割线偏移问题
- 去除UITableViewCell分割线的左间隙
- UItableViewCell的分割线顶头显示
- iOS 自定义UITableViewCell的分割线
- UITableViewCell 令人蛋疼的分割线!!!!
- iOS解决Cell的分割线宽度不满屏的方法
- UITableViewCell中去除没有内容的cell的分割线
- UITableViewCell分割线Lin seperator 的去掉方法
- AndroidL 操作延时的方法
- VS快捷键大全
- C++设计模式——简单工厂模式
- Android应用程序签名 debug签名
- Springmvc构造RESTful详细讲解
- UITableViewCell的分割线不满屏的解决办法
- 新 Android程序签名详解、打包、发布到Google play步骤
- 深入理解网络技术内幕 阅读笔记(二)
- C++设计模式——工厂方法模式
- 类名.class
- 输入adb shell 时 提示error: more than one device and emulator
- Android学习系列(1)--为App签名(为apk签名)
- spring mvc 异常 处理
- Xoreax IncrediBuild 安装使用