fix
This commit is contained in:
@@ -74,10 +74,11 @@
|
||||
CGFloat navH = SAFE_NAV_HEIGHT;
|
||||
|
||||
UIButton *numberBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[numberBtn setBackgroundImage:[UIImage imageNamed:@"ceshi_number"] forState:UIControlStateNormal];
|
||||
NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:@"1" attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
||||
[numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
[numberBtn setBackgroundImage:[UIImage imageNamed:@"result_logo"] forState:UIControlStateNormal];
|
||||
// NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:@"1" attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
//
|
||||
//
|
||||
// [numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
self.numberBtn = numberBtn;
|
||||
[self.view addSubview:numberBtn];
|
||||
|
||||
@@ -85,16 +86,20 @@
|
||||
titleLabel.text = @"悄悄地告诉你小优的年龄区间是?";
|
||||
titleLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:16];
|
||||
titleLabel.textColor = GIGARGB(63, 63, 63, 1);
|
||||
titleLabel.numberOfLines = 2;
|
||||
self.questionlabel = titleLabel;
|
||||
[titleLabel sizeToFit];
|
||||
[self.view addSubview:titleLabel];
|
||||
|
||||
UILabel *descLabel = [[UILabel alloc] init];
|
||||
descLabel.text = @"精准的选择,让小优更好的为您挑选最符合您的肤质的面膜";
|
||||
descLabel.font = [UIFont fontWithName:GIGA_FONTNAME size:12];
|
||||
descLabel.textColor = GIGARGB(208, 208, 208, 1);
|
||||
descLabel.numberOfLines = 0;
|
||||
|
||||
descLabel.numberOfLines = 3;
|
||||
descLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.descLabel = descLabel;
|
||||
[descLabel sizeToFit];
|
||||
[self.view addSubview:descLabel];
|
||||
|
||||
[numberBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -108,14 +113,14 @@
|
||||
|
||||
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(-53);
|
||||
|
||||
|
||||
}];
|
||||
|
||||
[descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(numberBtn.mas_right).offset(12);
|
||||
make.top.mas_equalTo(titleLabel.mas_bottom).offset(20);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-89);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-50);
|
||||
|
||||
}];
|
||||
|
||||
@@ -305,9 +310,9 @@
|
||||
-(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];
|
||||
// NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld",(long)_page] attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
//
|
||||
// [_numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
|
||||
self.questionlabel.text = [NSString stringWithFormat:@"%@",_currentModel.question];
|
||||
self.descLabel.text = _currentModel.remark;
|
||||
@@ -343,7 +348,7 @@
|
||||
|
||||
[self saveProgress];
|
||||
if (_page == self.questonArray.count ) {
|
||||
GIGA_ShowToast(@"没有了");
|
||||
//GIGA_ShowToast(@"没有了");
|
||||
[self submitAnswer];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#import "GiGaFileNanager.h"
|
||||
#import <WXApi.h>
|
||||
#import "MaskTestResult.h"
|
||||
#import "MaskTestNODataViewCell.h"
|
||||
|
||||
@interface MaskTestResultVC ()
|
||||
|
||||
@@ -42,11 +43,18 @@
|
||||
[self.tableView registerClass:[MaskResultMinViewCell class] forCellReuseIdentifier:@"MaskResultMinViewCell"];
|
||||
[self.tableView registerClass:[MaskResultShareViewCell class] forCellReuseIdentifier:@"MaskResultShareViewCell"];
|
||||
|
||||
|
||||
|
||||
if (!self.model) {
|
||||
[self addNavTitile:@"历史测试"];
|
||||
[self requstLatestTestData];
|
||||
}
|
||||
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
NC_REMOVE_NAME(self, NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)requstLatestTestData{
|
||||
@@ -75,11 +83,24 @@
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (self.model == nil) {
|
||||
return 1;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.model == nil) {
|
||||
MaskTestNODataViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTestNODataViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTestNODataViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
[cell.testBtn addTarget:self action:@selector(testBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
}
|
||||
|
||||
if (indexPath.row == 0) {
|
||||
static NSString *cellID = @"MaskResultPercentCell";
|
||||
MaskResultPercentCell *cell =[tableView dequeueReusableCellWithIdentifier:cellID];
|
||||
@@ -114,6 +135,10 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.model == nil) {
|
||||
return 255;
|
||||
}
|
||||
CGFloat viewH = KMainH - SAFE_NAV_HEIGHT;
|
||||
CGFloat cellH = viewH / 3 ;
|
||||
return cellH;
|
||||
@@ -182,6 +207,15 @@
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
//分享成功
|
||||
-(void)usershareSuccessNoti{
|
||||
|
||||
}
|
||||
|
||||
-(void)testBtnAction{
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user