This commit is contained in:
lianxiang
2018-09-29 20:12:56 +08:00
parent cb0accdb66
commit fc47921130
99 changed files with 1635 additions and 563 deletions
@@ -87,9 +87,11 @@
titleLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:16];
titleLabel.textColor = GIGARGB(63, 63, 63, 1);
titleLabel.numberOfLines = 2;
//titleLabel.backgroundColor = [UIColor redColor];
self.questionlabel = titleLabel;
[titleLabel sizeToFit];
//[titleLabel sizeToFit];
[self.view addSubview:titleLabel];
UILabel *descLabel = [[UILabel alloc] init];
descLabel.text = @"精准的选择,让小优更好的为您挑选最符合您的肤质的面膜";
@@ -113,7 +115,8 @@
make.left.mas_equalTo(numberBtn.mas_right).offset(12);
make.centerY.mas_equalTo(numberBtn.mas_centerY);
make.right.mas_equalTo(self.view.mas_right).offset(-20);
make.height.mas_equalTo(40);
}];
@@ -139,9 +142,13 @@
[self.view addSubview:nextBtn];
[nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(529 -navH);
if (self.view.frame.size.height <=504) {
make.top.mas_equalTo(self.view.mas_top).offset(504 - navH);
}else{
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
}
make.size.mas_equalTo(CGSizeMake(126, 40));
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 - 126 /2);
make.left.mas_equalTo(self.view.mas_centerX).offset(- 126 /2);
}];
@@ -159,15 +166,23 @@
[self.view addSubview:self.preBtn];
[self.preBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view.mas_left).offset(69);
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
make.size.mas_equalTo(CGSizeMake(97, 40));
if (self.view.frame.size.height <=504) {
make.top.mas_equalTo(self.view.mas_top).offset(504 - navH);
}else{
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
}
make.size.mas_equalTo(CGSizeMake(97, 40));
make.left.mas_equalTo(self.view.mas_centerX).offset(-10-97);
}];
if (_page == 1) {
self.preBtn.hidden = YES;
}
[self reloadViews];
}
-(void)creatQustionView{
@@ -247,8 +262,8 @@
}else{
model.defaultFlag = 0;
}
}];
}
-(void)loadRequestQuestions{
@@ -262,6 +277,10 @@
NSLog(@"result:%@",result.dic);
NSArray *list = result.dic[@"list"];
if (list.count==0 || [list isKindOfClass: [NSNull class]]) {
GIGA_ShowToast(@"");
return ;
}
for (NSDictionary *answerDic in list) {
ExercisesModel *model = [[ExercisesModel alloc] initWithDictionary:answerDic error:nil];
model.slidervalue = 0;
@@ -290,8 +309,8 @@
[self.questonArray addObject:model];
}
self.currentModel = self.questonArray[0];
self.currentModel = self.questonArray[0];
[self initUI];
}
}];
@@ -303,6 +322,7 @@
_currentModel = _questonArray[_page - 1];
[self reloadViews];
}
#pragma mark 刷新题目
@@ -310,11 +330,20 @@
-(void)reloadViews{
//刷新问题相关数据
// NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld",(long)_page] attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
//
// [_numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
if (_page == self.questonArray.count) {
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"完成" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[_nextBtn setAttributedTitle:nextTitle forState:UIControlStateNormal];
}else{
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"下一题" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[_nextBtn setAttributedTitle:nextTitle forState:UIControlStateNormal];
}
self.questionlabel.text = [NSString stringWithFormat:@"%@",_currentModel.question];
self.descLabel.text = _currentModel.remark;
//
@@ -325,19 +354,35 @@
if (_page > 1) {
self.preBtn.hidden = NO;
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
make.size.mas_equalTo(CGSizeMake(126, 40));
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 + 10);
if (self.view.frame.size.height <= 504) {
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(504 -SAFE_NAV_HEIGHT);
make.size.mas_equalTo(CGSizeMake(126, 40));
make.left.mas_equalTo(self.view.mas_centerX).offset(10);
}];
}];
}else{
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
make.size.mas_equalTo(CGSizeMake(126, 40));
make.left.mas_equalTo(self.view.mas_centerX).offset(10);
}];
}
}else{
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
if (self.view.frame.size.height <= 504) {
make.top.mas_equalTo(self.view.mas_top).offset(504 -SAFE_NAV_HEIGHT);
}else{
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
}
make.size.mas_equalTo(CGSizeMake(126, 40));
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 - 126 /2);
make.left.mas_equalTo(self.view.mas_centerX).offset(-63);
}];
self.preBtn.hidden = YES;
}
@@ -349,6 +394,7 @@
[self saveProgress];
if (_page == self.questonArray.count ) {
//GIGA_ShowToast(@"没有了");
[self submitAnswer];
return;
}
@@ -363,7 +409,7 @@
-(void)submitAnswer{
[self userTestEnd];
}
@@ -397,10 +443,12 @@
//获取结果
-(void)getTestResult{
self.nextBtn.userInteractionEnabled = NO;
NSDictionary *params = @{@"singleChoiceList":self.answerArray};
[self.view makeToastActivity:CSToastPositionCenter];
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kAiSkinTestResult];
[GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
self.nextBtn.userInteractionEnabled = YES;
[self.view hideToastActivity];
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
if (result.success) {
@@ -423,6 +471,7 @@
// MaskTestResult *model =[[MaskTestResult alloc] initWithDictionary:dic error:nil];
MaskTestResultVC *resultVC = [[MaskTestResultVC alloc] init];
resultVC.model = mode;
resultVC.isfromshouYE = YES;
[self.navigationController pushViewController:resultVC animated:YES];
}else{
@@ -11,6 +11,7 @@
@interface MaskTestResultVC : GiGaBaseViewController
@property (nonatomic,strong) MaskTestResult *model;
@property (nonatomic) BOOL isfromshouYE;
@end
@@ -17,17 +17,22 @@
#import <WXApi.h>
#import "MaskTestResult.h"
#import "MaskTestNODataViewCell.h"
#import "UIButton+WebCache.h"
#import "UIImageView+WebCache.h"
@interface MaskTestResultVC ()
@property (nonatomic,strong) UIView *tabheader;
//@property (nonatomic,strong) UIImageView *qrimageView;
@end
@implementation MaskTestResultVC
- (void)viewDidLoad {
[super viewDidLoad];
[self addNavTitile:@"测试结果"];
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
@@ -37,26 +42,160 @@
self.tableView.sectionFooterHeight = 0;
self.tableView.estimatedSectionFooterHeight= 0;
self.tableView.estimatedSectionHeaderHeight = 0;
//self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, 30)];
self.tableView.frame = CGRectMake(0,0,KMainW, self.view.frame.size.height);
//分享用默认隐藏
UIView *holdView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, SAFE_NAV_HEIGHT)];
holdView.backgroundColor = [UIColor whiteColor];
UIView *tabheader = [[UIView alloc] initWithFrame:holdView.bounds];
tabheader.backgroundColor = GIGA_MAIN_BGCOLOR;
[holdView addSubview:tabheader];
UILabel *reslabel = [[UILabel alloc] init];
reslabel.text = @"我的皮肤测试结果:";
reslabel.textColor = [UIColor whiteColor];
reslabel.font = GIGA_TEXTFONTBOLD(20);
[tabheader addSubview:reslabel];
[reslabel sizeToFit];
[reslabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(tabheader.mas_left).offset(18);
make.centerY.mas_equalTo(tabheader.mas_centerY);
}];
UIImageView *shareUserImageView = [[UIImageView alloc] init];
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
if (user) {
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]]) {
NSURL *url = [NSURL URLWithString:user.headImgUrl];
[shareUserImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
}
}
}
[tabheader addSubview:shareUserImageView];
[shareUserImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(tabheader.mas_right).offset(-18);
make.size.mas_equalTo(CGSizeMake(34, 34));
make.centerY.mas_equalTo(tabheader.mas_centerY);
}];
shareUserImageView.layer.masksToBounds = YES;
shareUserImageView.layer.cornerRadius = 17;
tabheader.hidden = YES;
self.tabheader = tabheader;
self.tableView.tableHeaderView = holdView;
self.tableView.frame = CGRectMake(0,-SAFE_NAV_HEIGHT,KMainW,KMainH);
[self.tableView registerClass:[MaskResultPercentCell class] forCellReuseIdentifier:@"MaskResultPercentCell"];
[self.tableView registerClass:[MaskResultMinViewCell class] forCellReuseIdentifier:@"MaskResultMinViewCell"];
[self.tableView registerClass:[MaskResultShareViewCell class] forCellReuseIdentifier:@"MaskResultShareViewCell"];
// if (@available(iOS 11.0, *)) {
// self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
//
//
// } else {
//
// self.automaticallyAdjustsScrollViewInsets = NO;
// }
if (!self.model) {
[self addNavTitile:@"历史测试"];
[self requstLatestTestData];
}else{
[self addNavTitile:@"测试结果"];
}
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
[self initUserAvator];
//重写返回按钮
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 40, 40);
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
[backBtn setImageEdgeInsets:UIEdgeInsetsMake(0,-14, 0, 14)];
//backBtn.backgroundColor = [UIColor redColor];
[backBtn addTarget:self action:@selector(backItemAction) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
}
//重写返回事件
- (void)backItemAction{
if (_isfromshouYE) {
[self.navigationController popToRootViewControllerAnimated:YES];
}else{
[self.navigationController popViewControllerAnimated:YES];
}
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
if (_isfromshouYE) {
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
}
}
- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
if (_isfromshouYE) {
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
}
}
-(void)dealloc{
NC_REMOVE_NAME(self, NC_UseShareSuccessNoti, nil);
}
-(void)initUserAvator{
//rightItem
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
rightBtn.frame = CGRectMake(0, 0, 40, 40);
rightBtn.layer.masksToBounds = YES;
rightBtn.layer.cornerRadius = 20;
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
[rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(40, 40));
}];
}
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
if (user) {
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]]) {
NSURL *url = [NSURL URLWithString:user.headImgUrl];
[rightBtn sd_setImageWithURL:url forState:UIControlStateNormal];
}
}
}
}
-(void)requstLatestTestData{
[self.view makeToastActivity:CSToastPositionCenter];
@@ -139,8 +278,11 @@
if (self.model == nil) {
return 255;
}
CGFloat viewH = KMainH - SAFE_NAV_HEIGHT;
CGFloat cellH = viewH / 3 ;
if (KMainW < 375) {
return 201;
}
CGFloat viewH = self.view.frame.size.height - SAFE_NAV_HEIGHT;
CGFloat cellH = viewH / 3;
return cellH;
}
@@ -160,16 +302,17 @@
GIGA_ShowToast(@"未安装微信");
return;
}
UIImage *image = [UIImage saveLongImage:self.tableView];
[self showFinalShareView];
UIImage *image = [UIImage saveNavsuitImage:self.tableView];
//[[GiGaFileNanager shareInstance] saveImaeToAlBum:image];
[self jxt_showActionSheetWithTitle:@"分享微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
[self jxt_showActionSheetWithTitle:@"分享微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionDefaultTitle(@"");
alertMaker.addActionDefaultTitle(@"微信好");
alertMaker.addActionDefaultTitle(@"朋友圈");
alertMaker.addActionCancelTitle(@"取消");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
[self hidSomeViews];
if (buttonIndex==0) {
//好友
[self shareImagToWX:image scene:WXSceneSession];
@@ -178,9 +321,30 @@
}else if (buttonIndex==1){
// 朋友圈
[self shareImagToWX:image scene:WXSceneTimeline];
}else{
GILog(@"取消");
}
}];
}
-(void)hidSomeViews{
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
cell.qrcodeImage.hidden = YES;
cell.shareBtn.hidden = NO;
cell.lastLabe.text = @"让更多的朋友一起加入面膜时间吧!";
self.tabheader.hidden = YES;
}
-(void)showFinalShareView{
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
cell.qrcodeImage.hidden = NO;
cell.shareBtn.hidden = YES;
cell.lastLabe.text = @"长按扫描二维码,测试你的肤质";
self.tabheader.hidden = NO;
}
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
WXMediaMessage *msg = [WXMediaMessage message];
@@ -207,15 +371,20 @@
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
//分享成功
-(void)usershareSuccessNoti{
//GIGA_ShowToast(@"分享成功");
if (_isfromshouYE) {
[self.navigationController popToRootViewControllerAnimated:YES];
}
}
-(void)testBtnAction{
[self.navigationController popToRootViewControllerAnimated:YES];
}
@end
@@ -30,6 +30,7 @@
twoLabel.textColor = GIGARGB(240, 147, 147, 0.1);
twoLabel.alpha = 0.6;
twoLabel.font = GIGA_TEXTFONTMEDIUM(200);
//oneLabel.backgroundColor = [UIColor redColor];
[self addSubview:twoLabel];
self.twoLabel = twoLabel;
@@ -42,29 +43,55 @@
make.bottom.mas_equalTo(self.mas_bottom);
}];
UILabel *jianyiLabel = [[UILabel alloc] init];
//jianyiLabel.backgroundColor = [UIColor redColor];
jianyiLabel.text = @"建议敷面膜时间";
jianyiLabel.textColor = [UIColor blackColor];
jianyiLabel.font = GIGA_TEXTFONTBOLD(24);
[self addSubview:jianyiLabel];
[jianyiLabel sizeToFit];
[jianyiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
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];
timeLabel.font = GIGA_TEXTFONTBOLD(35);
timeLabel.text = @"17分钟";
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(jianyiLabel.mas_bottom).offset(20);
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);
}];
//左侧红色梯形区域
@@ -91,7 +118,8 @@
}];
[self bringSubviewToFront:jianyiLabel];
[self bringSubviewToFront:jianyiImageView];
[self bringSubviewToFront:minueImageview];
[self bringSubviewToFront:timeLabel];
}
@@ -128,7 +156,7 @@
if ([minute isKindOfClass:[NSNull class]]) {
minute = @"17";
}
NSString *time = [NSString stringWithFormat:@"%@分钟",minute];
NSString *time = [NSString stringWithFormat:@"%@",minute];
self.timeLabel.text = time;
}
@@ -80,7 +80,11 @@
UILabel *duibiLabel = [[UILabel alloc] init];
duibiLabel.text = @"皮肤水油比";
duibiLabel.textColor = GIGARGB(55, 55, 55, 1);
duibiLabel.font = GIGA_TEXTFONTBOLD(24);
if (KMainW < 375) {
duibiLabel.font = GIGA_TEXTFONTBOLD(20);
}else{
duibiLabel.font = GIGA_TEXTFONTBOLD(24);
}
[self addSubview:duibiLabel];
[duibiLabel sizeToFit];
[duibiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -15,6 +15,7 @@
-(void)kidTitle:(MaskTestResult *)model;
@property (nonatomic,strong) UILabel *candLabe;
@property (nonatomic,strong) UIImageView *qrcodeImage;
@property (nonatomic,strong) UILabel *lastLabe;
@end
@@ -38,13 +38,18 @@
UILabel *candLabe = [[UILabel alloc] init];
candLabe.textColor = [UIColor blackColor];
candLabe.text = @"全效型";
candLabe.font = GIGA_TEXTFONTBOLD(30);
if (KMainW < 375) {
candLabe.font = GIGA_TEXTFONTBOLD(20);
}else{
candLabe.font = GIGA_TEXTFONTBOLD(30);
}
self.candLabe = candLabe;
[self addSubview:candLabe];
[candLabe sizeToFit];
[candLabe mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(shiheLabe.mas_right);
make.top.mas_equalTo(self.mas_top).offset(30);
make.centerY.mas_equalTo(shiheLabe.mas_centerY);
}];
//小图标
NSArray * imagesArr = @[@"result_water",@"result_moon",@"result_push"];
@@ -82,7 +87,31 @@
[logo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.mas_left).offset(26);
make.size.mas_equalTo(CGSizeMake(36, 36));
make.top.mas_equalTo(shareBtn.mas_bottom).offset(7);
if (KMainW < 375) {
make.top.mas_equalTo(self.mas_bottom).offset(-33);
}else{
make.top.mas_equalTo(self.mas_bottom).offset(-21);
}
}];
UIImageView *qrcodeImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"applink"]];
[self addSubview:qrcodeImage];
self.qrcodeImage = qrcodeImage;
self.qrcodeImage.hidden = YES;
[qrcodeImage mas_makeConstraints:^(MASConstraintMaker *make) {
if (KMainW < 375) {
make.size.mas_equalTo(CGSizeMake(60, 60));
make.right.mas_equalTo(self.mas_right).offset(-10);
}else{
make.size.mas_equalTo(CGSizeMake(85, 85));
make.right.mas_equalTo(self.mas_right).offset(-25);
}
make.bottom.mas_equalTo(self.mas_bottom).offset(15);
}];
UILabel *lastLabe = [[UILabel alloc] init];
@@ -90,11 +119,13 @@
lastLabe.font = GIGA_TEXTFONTBOLD(12);
lastLabe.textColor = GIGARGB(166, 33, 33, 1);
[self addSubview:lastLabe];
self.lastLabe = lastLabe;
[lastLabe sizeToFit];
[lastLabe mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(logo.mas_centerY);
make.centerX.mas_equalTo(self.mas_centerX);
make.top.mas_equalTo(shareBtn.mas_bottom).offset(15);
}];
//3