//
//  MarkBtn.m
//  KKCivilAd
//
//  Created by 雷俊博 on 2020/8/20.
//  Copyright © 2020 雷俊博. All rights reserved.
//

#import "MarkBtn.h"

@implementation MarkBtn

- (void)awakeFromNib
{
    [super awakeFromNib];
    self.layer.cornerRadius = 4;
    self.layer.borderColor = [UIColor colorWithHex:0xc1c1c1].CGColor;
    self.layer.borderWidth = 0.5;
    self.btnSelected = NO;
}

- (void)setBtnSelected:(BOOL)btnSelected
{
    _btnSelected = btnSelected;
    
    if (_btnSelected) {
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.backgroundColor = K_MainColor;
    }else{
        [self setTitleColor:[UIColor colorWithHex:0xc1c1c1] forState:UIControlStateNormal];
        self.backgroundColor = [UIColor whiteColor];
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
