cell分割线左对齐,不起作用?用下边的方法
来源:互联网 发布:淘宝网丝绒长裙 编辑:程序博客网 时间:2024/05/21 04:25
http://www.skyfox.org/ios7-tableview-separatorinset-ajust.html
ios7下
//ios8下的新方法
-(void)viewDidLayoutSubviews
{
if ([_iCoureseTabelViewrespondsToSelector:@selector(setSeparatorInset:)]) {
[_iCoureseTabelViewsetSeparatorInset:UIEdgeInsetsZero];
}
if ([_iCoureseTabelViewrespondsToSelector:@selector(setLayoutMargins:)]) {
[_iCoureseTabelViewsetLayoutMargins:UIEdgeInsetsZero];
}
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cellrespondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
if ([cellrespondsToSelector:@selector(setSeparatorInset:)]){
[cell setSeparatorInset:UIEdgeInsetsZero];
}
}
另外一种方法是
在cell init方法里加
if ([self respondsToSelector:@selector(setLayoutMargins:)])
{
self.preservesSuperviewLayoutMargins = NO;
self.layoutMargins = UIEdgeInsetsZero;
}
if ([self respondsToSelector:@selector(setSeparatorInset:)])
{
self.separatorInset = UIEdgeInsetsZero;
}
- cell分割线左对齐,不起作用?用下边的方法
- cell分割线左对齐
- iOS8 tableview separatorInset cell分割线左对齐,ios7的方法失效了
- iOS7 cell分割线左对齐
- cell让分割线左对齐
- iOS7 tableview separatorInset cell分割线左对齐
- iOS7 tableview separatorInset cell分割线左对齐
- iOS7 tableview separatorInset cell分割线左对齐
- 设置UITableView的分割线左对齐
- UITableViewCell 分割线左对齐
- TableView分割线左对齐
- Swift3.0 Swift中cell分割线靠左对齐,cell基类封装
- cell的分割线
- IOS-52-UITableView中cell分割线左对齐(解决iOS8版本适配问题)
- iOS 8 UITableViewCell 分割线 左对齐
- iOS8 Separator 分割线左对齐
- cell的分割线问题
- tableView的cell之间的分割线长度改变方法
- linux/Windows系统中取SN号
- eclipse你最常用的快捷键
- Linux&Windows物理资源查看
- nginx安装和域名转换配置
- numix-cicle圆形图标
- cell分割线左对齐,不起作用?用下边的方法
- 在MAC上搭建自己的交互式网站
- 嫡狗胺仆乃只呕傧
- 使用jQuery和CSS3制作数字时钟(jQuery篇) 附源码下载
- 漫步云端:CoreOS实践指南(一)
- 【转】winform窗体间传值
- ubuntu12.04开启Samba服务
- Haproxy+keepalived安装配置
- 修改linux虚拟机克隆时网卡变成eth1