123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // YXFindItemView.m
- // Temperature
- //
- // Created by TC on 2025/4/9.
- //
- #import "YXFindItemView.h"
- @implementation YXFindItemView
- - (instancetype)init
- {
- self = [super init];
- if (self) {
- [self setItemSubViews];
- }
- return self;
- }
- -(void)setItemSubViews
- {
- UIImageView *picView = [[UIImageView alloc]init];
- [self addSubview:picView];
- [picView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.equalTo(self.mas_centerX);
- make.top.equalTo(@5);
- make.width.equalTo(@40);
- make.height.equalTo(@40);
- }];
- self.picImgView = picView;
-
- UILabel *textLabel = [[UILabel alloc]init];
- textLabel.font = [UIFont systemFontOfSize:14];
- textLabel.textAlignment = NSTextAlignmentCenter;
- textLabel.textColor = [UIColor colorWithHexString:@"#333333"];
- [self addSubview:textLabel];
- [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(picView.mas_bottom);
- make.left.equalTo(@5);
- make.right.equalTo(@-5);
- make.bottom.equalTo(@0);
- }];
- self.textLabel = textLabel;
-
-
-
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|