You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
// |
|
// ProblemCollectionViewCell.m |
|
// LekangGuard |
|
// |
|
// Created by ecell on 2022/12/30. |
|
// |
|
|
|
#import "ProblemCollectionViewCell.h" |
|
|
|
@interface ProblemCollectionViewCell () |
|
|
|
|
|
@property (nonatomic ,weak) UILabel *cenLabel; |
|
|
|
@end |
|
|
|
@implementation ProblemCollectionViewCell |
|
|
|
- (instancetype)initWithFrame:(CGRect)frame |
|
{ |
|
self = [super initWithFrame:frame]; |
|
if (self) |
|
{ |
|
self.backgroundColor = KKWhiteColorColor; |
|
|
|
self.layer.cornerRadius = 3; |
|
self.layer.masksToBounds = YES; |
|
[self subCellView]; |
|
} |
|
return self; |
|
} |
|
|
|
- (void)setTitleText:(NSString *)titleText |
|
{ |
|
_titleText = titleText; |
|
self.cenLabel.text = titleText; |
|
} |
|
|
|
- (void)subCellView |
|
{ |
|
UILabel *cenLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontADA_(12) textColor:KKTextBlackColor text:@"" Radius:0]; |
|
self.cenLabel = cenLabel; |
|
[self.contentView addSubview:cenLabel]; |
|
[cenLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
|
make.left.right.equalTo(self.contentView); |
|
make.centerY.equalTo(self.contentView); |
|
}]; |
|
} |
|
|
|
@end
|
|
|