| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- //
- // MORankNoDataView.m
- // MiMoLive
- //
- // Created by MiMo on 2025/9/12.
- //
- #import "MORankNoDataView.h"
- @interface MORankNoDataView ()
- @property (nonatomic, strong) UIView *contentView;
- @property (nonatomic, strong) UIImageView *iconImgView;
- @property (nonatomic, strong) UILabel *descLabel;
- @end
- @implementation MORankNoDataView
- - (instancetype)initWithFrame:(CGRect)frame {
- if (self = [super initWithFrame:frame]) {
- [self setupUI];
- }
- return self;
- }
- - (void)setupUI {
- [self addSubview:self.contentView];
- [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.mas_equalTo(0);
- }];
-
- [self.contentView addSubview:self.iconImgView];
- [self.iconImgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(71);
- make.centerX.mas_equalTo(0);
- make.size.mas_equalTo(CGSizeMake(120, 120));
- }];
-
- [self.contentView addSubview:self.descLabel];
- [self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.iconImgView.mas_bottom).offset(18);
- make.left.mas_equalTo(48);
- make.right.mas_equalTo(-48);
- }];
-
- [self.contentView addSubview:self.sendButton];
- [self.sendButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.descLabel.mas_bottom).offset(16);
- make.left.mas_equalTo(48);
- make.right.mas_equalTo(-48);
- make.height.mas_equalTo(48);
- }];
- }
- #pragma mark - Lazy
- - (UIView *)contentView {
- if (!_contentView) {
- _contentView = [[UIView alloc] init];
- }
- return _contentView;
- }
- - (UIImageView *)iconImgView {
- if (!_iconImgView) {
- _iconImgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_rank_no_data"]];
- }
- return _iconImgView;
- }
- - (UILabel *)descLabel {
- if (!_descLabel) {
- _descLabel = [[UILabel alloc] init];
- _descLabel.text = NSLocalString(@"C60032");
- _descLabel.textColor = [MOTools colorWithHexString:@"#000000"];
- _descLabel.font = [MOTextTools regularFont:14];
- _descLabel.textAlignment = NSTextAlignmentCenter;
- _descLabel.numberOfLines = 0;
- }
- return _descLabel;
- }
- - (MORankBottomButton *)sendButton {
- if (!_sendButton) {
- _sendButton = [[MORankBottomButton alloc] initWithFrame:CGRectMake(0, 0, kScaleWidth(280), 48)];
- }
- return _sendButton;
- }
- @end
|