89 lines
2.9 KiB
Objective-C
89 lines
2.9 KiB
Objective-C
//
|
|
// HeardBadTabFooterView.m
|
|
// EscortProject
|
|
//
|
|
// Created by 仁康信息 on 2023/12/14.
|
|
//
|
|
|
|
#import "HeardBadTabFooterView.h"
|
|
|
|
@interface HeardBadTabFooterView ()
|
|
|
|
@property (nonatomic, strong) UIView * warnView ;
|
|
|
|
@end
|
|
|
|
@implementation HeardBadTabFooterView
|
|
|
|
/*
|
|
// Only override drawRect: if you perform custom drawing.
|
|
// An empty implementation adversely affects performance during animation.
|
|
- (void)drawRect:(CGRect)rect {
|
|
// Drawing code
|
|
}
|
|
*/
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
|
|
if (self = [super initWithFrame:frame]) {
|
|
|
|
[self createUI];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)createUI {
|
|
|
|
|
|
UIView * watchView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(16), kScreenWidth - kRealValue(30), kRealValue(143))];
|
|
watchView.layer.cornerRadius = 15;
|
|
watchView.backgroundColor = KWhiteColor;
|
|
watchView.layer.masksToBounds = true;
|
|
[self addSubview:watchView];
|
|
CGFloat footWidth = (watchView.width - kRealValue(60))/3;
|
|
|
|
for (int i = 0; i < 3; i ++) {
|
|
|
|
UIView * footView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15) + (footWidth + kRealValue(15) )* i, kRealValue(11), footWidth, kRealValue(123))];
|
|
footView.layer.cornerRadius = 15;
|
|
footView.backgroundColor = KWhiteColor;
|
|
footView.layer.masksToBounds = true;
|
|
|
|
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(19), footWidth, 16)];
|
|
titleLabel.font = BOLDSYSTEMFONT(16);
|
|
titleLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
|
UILabel * contLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLabel.bottom + kRealValue(12), footWidth, footView.height - kRealValue(56))];
|
|
contLabel.font = MEDIUMFONT(12);
|
|
contLabel.numberOfLines = 0;
|
|
contLabel.textColor = UIColorHex(#77849E);
|
|
contLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
|
if (i == 0) {
|
|
footView.backgroundColor = UIColorHex(#E3F2F9);
|
|
titleLabel.text = @"穿戴设备";
|
|
titleLabel.textColor = UIColorHex(#0789C0);
|
|
contLabel.text = @"佩戴90天23小时\n充电284次";
|
|
|
|
}
|
|
if (i == 1) {
|
|
footView.backgroundColor = UIColorHex(#FFF3EB);
|
|
titleLabel.text = @"预警研究";
|
|
titleLabel.textColor = UIColorHex(#E7AE84);
|
|
contLabel.text = @"心率失常权重 \n 心率失常权重 \n 心率失常权重";
|
|
}
|
|
if (i == 2) {
|
|
footView.backgroundColor = UIColorHex(#FFEFF2);
|
|
titleLabel.text = @"心脏体检";
|
|
titleLabel.textColor = UIColorHex(#D16685);
|
|
contLabel.text = @"心电图正常 \n 心脏CTA正常 \n 检验指标正常";
|
|
}
|
|
[watchView addSubview:footView];
|
|
[footView addSubview:titleLabel];
|
|
[footView addSubview:contLabel];
|
|
}
|
|
|
|
}
|
|
|
|
@end
|