This commit is contained in:
lianxiang
2018-10-09 09:02:59 +08:00
parent 431a19b043
commit dc1b1e330f
50 changed files with 880 additions and 255 deletions
@@ -436,8 +436,7 @@
}];
}
}
//获取结果
@@ -458,6 +457,8 @@
NSUInteger minute = [mode.minute integerValue];
NSTimeInterval time = minute * 60;
[GiGaUserDefault savaMaskeTime:time];
[GiGaUserDefault saveUserTestFlag:YES];
NC_POST_NAME_OBJECT(@"testfalgUpdate", nil);
//展示结果
// NSDictionary *dic = @{
@@ -19,6 +19,8 @@
#import "MaskTestNODataViewCell.h"
#import "UIButton+WebCache.h"
#import "UIImageView+WebCache.h"
#import "GiGaUserInfoVC.h"
@interface MaskTestResultVC ()
@property (nonatomic,strong) UIView *tabheader;
@@ -139,6 +141,7 @@
[self.navigationController popViewControllerAnimated:YES];
}
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
@@ -173,7 +176,7 @@
rightBtn.layer.masksToBounds = YES;
rightBtn.layer.cornerRadius = 20;
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(goUserInfoView) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
@@ -196,6 +199,11 @@
}
}
-(void)goUserInfoView{
GiGaUserInfoVC *userVC= [[GiGaUserInfoVC alloc] init];
[self.navigationController pushViewController:userVC animated:YES];
}
-(void)requstLatestTestData{
[self.view makeToastActivity:CSToastPositionCenter];
@@ -43,57 +43,7 @@
make.bottom.mas_equalTo(self.mas_bottom);
}];
UIImageView *jianyiImageView = [[UIImageView alloc] init];
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
[self addSubview:jianyiImageView];
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.mas_left).offset(40);
make.top.mas_equalTo(self.mas_top).offset(36);
if (KMainW < 375) {
make.size.mas_equalTo(CGSizeMake(139, 30));
}else{
make.size.mas_equalTo(CGSizeMake(179, 30));
}
}];
//时间⌚️
UILabel *timeLabel = [[UILabel alloc] init];
timeLabel.textColor = [UIColor blackColor];
if (KMainW < 375) {
timeLabel.font = GIGA_TEXTFONTBOLD(24);
}else{
timeLabel.font = GIGA_TEXTFONTBOLD(35);
}
timeLabel.text = @"17";
self.timeLabel = timeLabel;
[self addSubview:timeLabel];
[timeLabel sizeToFit];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.mas_left).offset(73);
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
}];
//分钟图片
UIImageView *minueImageview = [[UIImageView alloc] init];
minueImageview.image = [UIImage imageNamed:@"share_minute"];
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:minueImageview];
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(timeLabel.mas_right);
if (KMainW < 375) {
//se 5s
make.size.mas_equalTo(CGSizeMake(48, 49));
}else{
make.size.mas_equalTo(CGSizeMake(72, 49));
}
make.centerY.mas_equalTo(timeLabel.mas_centerY);
}];
//左侧红色梯形区域
UIView *colorView = [[UIView alloc] init];
@@ -118,6 +68,57 @@
}];
UIImageView *jianyiImageView = [[UIImageView alloc] init];
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
[self addSubview:jianyiImageView];
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(colorView.mas_left).offset((KMainW - 82)*0.424);
make.top.mas_equalTo(self.mas_top).offset(36);
if (KMainW < 375) {
make.size.mas_equalTo(CGSizeMake(139, 30));
}else{
make.size.mas_equalTo(CGSizeMake(179, 30));
}
}];
//分钟图片
UIImageView *minueImageview = [[UIImageView alloc] init];
minueImageview.image = [UIImage imageNamed:@"share_minute"];
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:minueImageview];
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(colorView.mas_left).offset(20);
if (KMainW < 375) {
//se 5s
make.size.mas_equalTo(CGSizeMake(48, 49));
}else{
make.size.mas_equalTo(CGSizeMake(72, 49));
}
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
}];
//时间⌚️
UILabel *timeLabel = [[UILabel alloc] init];
timeLabel.textColor = [UIColor blackColor];
if (KMainW < 375) {
timeLabel.font = GIGA_TEXTFONTBOLD(24);
}else{
timeLabel.font = GIGA_TEXTFONTBOLD(35);
}
timeLabel.text = @"17";
self.timeLabel = timeLabel;
[self addSubview:timeLabel];
[timeLabel sizeToFit];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(minueImageview.mas_left).offset(0);
make.centerY.mas_equalTo(minueImageview.mas_centerY);
}];
[self bringSubviewToFront:jianyiImageView];
[self bringSubviewToFront:minueImageview];
[self bringSubviewToFront:timeLabel];
@@ -125,6 +126,7 @@
}
- (void)layoutSubviews{
[super layoutSubviews];
[self drawViewInView:self.colorView backColor:GIGA_MAIN_BGCOLOR];
}
@@ -125,7 +125,7 @@
[lastLabe mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(logo.mas_centerY);
make.centerX.mas_equalTo(self.mas_centerX);
make.left.mas_equalTo(logo.mas_right).offset(5);
}];
//3