TableView 编辑时,底部线的处理

来源:互联网 发布:h3c批量配置端口模式 编辑:程序博客网 时间:2024/05/07 15:23

 

self.contentView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height-1);

    
    self.selectedBackgroundView = [[UIView alloc]initWithFrame:self.frame];
    
    UIView *bottomBackLine = [[UIView alloc] init];
    
    [self.selectedBackgroundView addSubview:bottomBackLine];
    
    bottomBackLine.backgroundColor = DefultColor_LineColor;
    
    [bottomBackLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(weakself.selectedBackgroundView);
        make.left.equalTo(weakself.selectedBackgroundView);
        make.bottom.equalTo(weakself.selectedBackgroundView).offset(-1);
        make.height.equalTo(@0.8);
    }];

   


  UIView *bottomBackTempLine = [[UIView alloc] init];
    
    self.backgroundView =  [[UIView alloc]initWithFrame:self.frame];
    
    [self.backgroundView addSubview:bottomBackTempLine];
    
    [bottomBackTempLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(weakself.backgroundView);
        make.left.equalTo(weakself.backgroundView);
        make.bottom.equalTo(weakself.backgroundView);
        make.height.equalTo(@0.8);
    }];
    
    bottomBackTempLine.backgroundColor = DefultColor_LineColor;//KDefaultOrange_Color;
    
    
    self.selectedBackgroundView.backgroundColor = [UIColor whiteColor];