//
|
// 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
|