| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // MORedBaseView.m
- // MiMoLive
- //
- // Created by SuperC on 2025/8/28.
- //
- #import "MORedBaseView.h"
- #import "UIView+MOCornerRadius.h"
- @interface MORedBaseView ()
- @end
- @implementation MORedBaseView
- - (instancetype)init {
- if (self = [super init] ) {
- [self setupUI];
- }
- return self;
- }
- - (instancetype)initWithFrame:(CGRect)frame{
- self = [super initWithFrame:frame];
- if (self){
- [self setupUI];
- }
- return self;
- }
- - (void)setupUI{
- [self addSubview:self.lianMaiRedLab];
- [self.lianMaiRedLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.equalTo(self);
- }];
- }
- - (void)layoutSubviews {
- [super layoutSubviews];
- [self.lianMaiRedLab setCornerRadiusWithTopLeft:12.0
- topRight:12.0
- bottomRight:12.0
- bottomLeft:4.0];
- }
- - (UILabel *)lianMaiRedLab{
- if(!_lianMaiRedLab){
- _lianMaiRedLab = [[UILabel alloc] init];
- _lianMaiRedLab.font = [MOTextTools mediumFont:14.0];
- _lianMaiRedLab.textColor = [MOTools colorWithHexString:@"#FFFFFF" alpha:1.0];
- _lianMaiRedLab.textAlignment = NSTextAlignmentCenter;
- _lianMaiRedLab.backgroundColor = [MOTools colorWithHexString:@"#FD3B3B"];
- }
- return _lianMaiRedLab;
- }
- @end
|