zoukankan      html  css  js  c++  java
  • 不用画线 设置UITableView的全屏分隔线

    如图  添加如下代码

        sTableView.separatorInset = UIEdgeInsetsZero;

        sTableView.layoutMargins = UIEdgeInsetsZero;

        cell.layoutMargins = UIEdgeInsetsZero;

    第二种方法如下图   

    -(void)viewDidLayoutSubviews

    {

        

        [super viewDidLayoutSubviews];

        

        if ([_moreTableView respondsToSelector:@selector(setSeparatorInset:)]) {

            [_moreTableView setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];

        }

        

        if ([_moreTableView respondsToSelector:@selector(setLayoutMargins:)]) {

            [_moreTableView 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];

        }

        

    }

    少于150字不让发候选区   那我就多打点字吧。啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 

  • 相关阅读:
    ES6学习笔记(七)-对象扩展
    ES6学习笔记(四)-数值扩展
    ES6学习笔记(三)-正则扩展
    ES6学习笔记(二)-字符串的扩展
    ES6学习笔记(一)-变量的解构赋值
    webpack打包踩坑之TypeError: Cannot read property 'bindings' of null
    CSS之Flex 布局
    iscsi
    DHCP
    DNS
  • 原文地址:https://www.cnblogs.com/KiVen2015/p/5385739.html
Copyright © 2011-2022 走看看