1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
//  KeyWordCell.m
//  IphoneBIMe
//
//  Created by ZhangJF on 2023/3/9.
//  Copyright © 2023 ProBIM. All rights reserved.
//
 
#import "KeyWordCell.h"
 
@implementation KeyWordCell
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI {
    self.backgroundColor = [UIColor colorWithRed:229 / 255.0 green:239 / 255.0 blue:250 / 255.0 alpha:1.0];
    UILabel *label = [[UILabel alloc] init];
    label.font = [UIFont systemFontOfSize:14];
    label.textColor = [UIColor colorWithRed:0 / 255.0 green:122 / 255.0 blue:255 / 255.0 alpha:1.0];
    self.textLabel = label;
    [self.contentView addSubview:self.textLabel];
    [self.textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(5);
        make.bottom.equalTo(self.contentView).offset(-5);
        make.left.equalTo(self.contentView).offset(10);
        make.right.equalTo(self.contentView).offset(-10);
    }];
}
 
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.layer.cornerRadius = 6.0f;
}
@end