82 lines
2.5 KiB
Mathematica
82 lines
2.5 KiB
Mathematica
|
|
//
|
||
|
|
// THHomeHotPartyView.m
|
||
|
|
// TreeHole
|
||
|
|
//
|
||
|
|
// Created by iOS on 2023/2/6.
|
||
|
|
// Copyright © 2023 CYH. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "THHomeHotPartyView.h"
|
||
|
|
|
||
|
|
@interface THHomeHotPartyView ()
|
||
|
|
|
||
|
|
//@property(nonatomic, strong)UIImageView *backImgView;
|
||
|
|
@property(nonatomic, strong)UIImageView *hotImgView;
|
||
|
|
@property(nonatomic, strong)UILabel *titleLb;
|
||
|
|
@property(nonatomic, strong)UILabel *countLb;
|
||
|
|
@property(nonatomic, strong)UIImageView *arrowImgView;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@implementation THHomeHotPartyView
|
||
|
|
|
||
|
|
- (void)setNumberStr:(NSString *)numberStr {
|
||
|
|
_numberStr = numberStr;
|
||
|
|
self.countLb.text = numberStr;
|
||
|
|
|
||
|
|
[self layoutIfNeeded];
|
||
|
|
[self setNeedsLayout];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)setupSubViews {
|
||
|
|
// self.backImgView = [UIImageView creatViewInSuperView:self];
|
||
|
|
// self.backImgView.image = UIImageMake(@"");
|
||
|
|
|
||
|
|
self.hotImgView = [UIImageView creatViewInSuperView:self];
|
||
|
|
self.hotImgView.image = UIImageMake(@"TH_HotParty_home");
|
||
|
|
|
||
|
|
self.titleLb = [UILabel creatViewInSuperView:self];
|
||
|
|
self.titleLb.font = UIFontMediumMake(W_Scale(15));
|
||
|
|
self.titleLb.textColor = UIColorMakeWhiteAlpha(0.9);
|
||
|
|
self.titleLb.text = @"酒馆派对火热进行中......";
|
||
|
|
|
||
|
|
self.countLb = [UILabel creatViewInSuperView:self];
|
||
|
|
self.countLb.font = UIFontMediumMake(W_Scale(12));
|
||
|
|
self.countLb.textColor = UIColorMakeWithHex(@"#FFFFFF");
|
||
|
|
self.countLb.text = @"0.0W+次参与";
|
||
|
|
|
||
|
|
self.arrowImgView = [UIImageView creatViewInSuperView:self];
|
||
|
|
self.arrowImgView.image = UIImageMake(@"TH_hotArrow");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)layoutSubviews {
|
||
|
|
[super layoutSubviews];
|
||
|
|
|
||
|
|
// CGSize selfSize = self.size;
|
||
|
|
|
||
|
|
CGFloat hotImgViewX = 10;
|
||
|
|
CGFloat hotImgViewWH = 24;
|
||
|
|
|
||
|
|
self.hotImgView.size = CGSizeMake(hotImgViewWH, hotImgViewWH);
|
||
|
|
self.hotImgView.qmui_left = hotImgViewX;
|
||
|
|
self.hotImgView.qmui_top = self.hotImgView.qmui_topWhenCenterInSuperview;
|
||
|
|
|
||
|
|
CGFloat arrowImgViewWH = 18;
|
||
|
|
self.arrowImgView.size = CGSizeMake(arrowImgViewWH, arrowImgViewWH);
|
||
|
|
self.arrowImgView.qmui_right = self.qmui_width - 10;
|
||
|
|
self.arrowImgView.qmui_top = self.arrowImgView.qmui_topWhenCenterInSuperview;
|
||
|
|
|
||
|
|
[self.countLb sizeToFit];
|
||
|
|
self.countLb.qmui_right = self.arrowImgView.qmui_left - 2;
|
||
|
|
self.countLb.qmui_top = self.countLb.qmui_topWhenCenterInSuperview;
|
||
|
|
|
||
|
|
[self.titleLb sizeToFit];
|
||
|
|
self.titleLb.qmui_left = self.hotImgView.qmui_right + 2;
|
||
|
|
self.titleLb.qmui_top = self.titleLb.qmui_topWhenCenterInSuperview;
|
||
|
|
// self.titleLb.qmui_right = self.countLb.qmui_left - 18;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
@end
|