77 lines
1.3 KiB
Objective-C
77 lines
1.3 KiB
Objective-C
//
|
|
// HealthyToolsView.m
|
|
// XinjiangProject
|
|
//
|
|
// Created by 仁康信息 on 2023/4/14.
|
|
//
|
|
|
|
#import "HealthyToolsView.h"
|
|
|
|
@interface HealthyToolsView ()
|
|
|
|
@property (nonatomic, strong) UILabel * nameLabel;
|
|
|
|
@property (nonatomic, strong) UILabel * detailLabel;
|
|
|
|
@property (nonatomic, strong) UIImageView * toolsImage;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation HealthyToolsView
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
|
|
if (self = [super initWithFrame:frame]) {
|
|
|
|
[self createUI];
|
|
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)createUI {
|
|
|
|
self.toolsImage = [[UIImageView alloc] init];
|
|
[self addSubview:self.toolsImage];
|
|
|
|
[self.toolsImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.offset(0);
|
|
}];
|
|
|
|
}
|
|
|
|
- (void)setBackColor:(UIColor *)backColor {
|
|
|
|
_backColor = backColor;
|
|
|
|
self.backgroundColor = _backColor;
|
|
}
|
|
|
|
- (void)setNameString:(NSString *)nameString {
|
|
|
|
_nameString = nameString;
|
|
|
|
self.nameLabel.text = _nameString;
|
|
|
|
}
|
|
|
|
- (void)setDetailString:(NSString *)detailString {
|
|
|
|
_detailString = detailString;
|
|
|
|
self.detailLabel.text = _detailString;
|
|
}
|
|
|
|
- (void)setImageString:(NSString *)imageString {
|
|
|
|
_imageString = imageString;
|
|
|
|
self.toolsImage.image = [UIImage imageNamed:_imageString];
|
|
|
|
}
|
|
|
|
@end
|