123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // ASVipCenterCollectCell.m
- // Asteria
- //
- // Created by iOS on 2023/6/27.
- //
- #import "ASVipCenterCollectCell.h"
- @interface ASVipCenterCollectCell ()
- @property (nonatomic, strong) UIImageView *imgV;
- @end
- @implementation ASVipCenterCollectCell
- - (void)setData:(NSString *)imgName desStr:(NSString *)desStr {
- self.imgV.image = [UIImage imageNamed:imgName];
- self.desLb.text = desStr;
- }
- - (instancetype)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- [self addSubview:self.imgV];
- [self addSubview:self.desLb];
-
- [self.imgV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.leading.equalTo(self).offset(20);
- make.trailing.equalTo(self).offset(-20);
- make.top.bottom.equalTo(self);
- }];
- [self.desLb mas_makeConstraints:^(MASConstraintMaker *make) {
- make.trailing.equalTo(self.imgV).offset(-24);
- make.leading.greaterThanOrEqualTo(self.imgV).offset(24);
- make.bottom.equalTo(self.imgV).offset(-24);
- make.height.equalTo(@17);
- }];
- }
- return self;
- }
- - (UIImageView *)imgV {
- if (!_imgV) {
- UIImageView *v = [UIImageView baseImgV];
- _imgV = v;
- }
- return _imgV;
- }
- - (UILabel *)desLb {
- if (!_desLb) {
- UILabel *lb = [UILabel baseLb];
- lb.font = [UIFont fontWithName:Rob_BoldItalic size:14];
- lb.textColor = Col_000;
- lb.textAlignment = NSTextAlignmentRight;
- _desLb = lb;
- }
- return _desLb;
- }
- @end
|