//
//  BCNewAcivityCell.m
//  Open
//
//  Created by 雷俊博 on 2020/12/10.
//  Copyright © 2020 黄江涛 . All rights reserved.
//

#import "BCNewAcivityCell.h"

@implementation BCNewAcivityCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.layer.cornerRadius=5.0f;
    self.layer.masksToBounds=YES;
    self.contentView.alpha = 0.8;
    
    if (ScreenWidth <= 320) {
        self.lb_amountDescri.font = [UIFont systemFontOfSize:9];
        self.lb_message1.font = [UIFont boldSystemFontOfSize:10];
        self.lb_message2.font = [UIFont systemFontOfSize:10];
        self.lb_message3.font = [UIFont systemFontOfSize:10];
    }
    [self.selectBtn setImage:[UIImage imageNamed:@"InsuredMember_selectedicon"] forState:UIControlStateNormal];
}

-(void)setFrame:(CGRect)frame
{
    frame.origin.x =10;//这里间距为10，可以根据自己的情况调整
    frame.size.width -=frame.origin.x * 2;
    [super setFrame:frame];
}

- (void)setSelectState:(BOOL)selectState {
    if (selectState) {
        
        self.lb_amount.alpha = 1.0;
        self.lb_amountDescri.alpha = 1.0;
        self.lb_message1.alpha = 1.0;
        self.lb_message2.alpha = 1.0;
        self.lb_message3.alpha = 1.0;
        self.backgroundColor = kRGBColor(254, 240, 237);
        self.selectBtn.hidden = NO;
        
    }else {
        self.lb_amount.alpha = 0.6;
        self.lb_amountDescri.alpha = 0.6;
        self.lb_message1.alpha = 0.6;
        self.lb_message2.alpha = 0.6;
        self.lb_message3.alpha = 0.6;
        self.backgroundColor = [UIColor whiteColor];
        self.selectBtn.hidden = YES;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
