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字不让发候选区   那我就多打点字吧。啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 啦啦啦 

  • 相关阅读:
    Codefoces Gym 101652 【最大连续和】
    HYSBZ 4034 【树链剖分】+【线段树 】
    Codeforces Gym 101291C【优先队列】
    Codeforces gym 101291 M (最长交替子序列)【DP】
    HDU 3308 LCIS (经典区间合并)【线段树】
    POJ 3237 Tree (树链剖分+边权转点权)
    POJ 2763 Housewife Wind (树链剖分+边权转点权)
    P1054 等价表达式
    P1107 [BJWC2008]雷涛的小猫
    P1552 [APIO2012]派遣
  • 原文地址:https://www.cnblogs.com/KiVen2015/p/5385739.html
Copyright © 2011-2022 走看看