修复加热棒的显示
This commit is contained in:
parent
305c6c0c49
commit
c12010e06a
|
|
@ -70,7 +70,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>478</string>
|
<string>479</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang_off"];
|
NSArray *nameArr=@[@"PFLight1_off",@"PFLight1_off",@"ChongLang_off",@"O2_off",@"",@"PFkilLlight_off",@"JiaReBang"];
|
||||||
|
|
||||||
CGFloat btnControlWith = 70;
|
CGFloat btnControlWith = 70;
|
||||||
CGFloat btnControlPlace = (kScreenSize.width - 3*btnControlWith )/4;
|
CGFloat btnControlPlace = (kScreenSize.width - 3*btnControlWith )/4;
|
||||||
|
|
@ -242,7 +242,18 @@
|
||||||
|
|
||||||
self.button.tag= 600003+i;
|
self.button.tag= 600003+i;
|
||||||
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
[self.button addTarget:self action:@selector(songNuoBDBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
if (i == 2) {
|
||||||
|
[self.button setImage:[UIImage imageNamed:nameArr.lastObject] forState:UIControlStateNormal];
|
||||||
|
UILabel *tempLbl = [UILabel new];
|
||||||
|
[self.button addSubview:tempLbl];
|
||||||
|
tempLbl.tag = 1;
|
||||||
|
tempLbl.font = [UIFont boldSystemFontOfSize:16];
|
||||||
|
tempLbl.textColor = [UIColor lightGrayColor];
|
||||||
|
tempLbl.textAlignment = NSTextAlignmentCenter;
|
||||||
|
tempLbl.translatesAutoresizingMaskIntoConstraints = NO;
|
||||||
|
[NSLayoutConstraint constraintWithItem:tempLbl attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.button attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0.0].active = YES;
|
||||||
|
[NSLayoutConstraint constraintWithItem:tempLbl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.button attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:-4.0].active = YES;
|
||||||
|
}
|
||||||
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + btnControlWith +11, btnControlWith, 14)];
|
UILabel* textLbl = [[UILabel alloc] initWithFrame:CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith),currentY + btnControlWith +11, btnControlWith, 14)];
|
||||||
//textLbl.backgroundColor = [UIColor blackColor];
|
//textLbl.backgroundColor = [UIColor blackColor];
|
||||||
textLbl.textAlignment = NSTextAlignmentCenter;
|
textLbl.textAlignment = NSTextAlignmentCenter;
|
||||||
|
|
|
||||||
|
|
@ -471,15 +471,18 @@
|
||||||
//加热 注意只有一个字节 加热棒只控制温度不设置开关 开关状态服务器返回
|
//加热 注意只有一个字节 加热棒只控制温度不设置开关 开关状态服务器返回
|
||||||
|
|
||||||
NSString*stateString6=[backModel.heatStickState substringWithRange:NSMakeRange(0, 2)];
|
NSString*stateString6=[backModel.heatStickState substringWithRange:NSMakeRange(0, 2)];
|
||||||
|
UInt64 mac=[dataContorl hexToTen:backModel.heatTemperature];
|
||||||
if ([stateString6 isEqualToString:@"01"]) {
|
float TPlabel=mac/10;
|
||||||
[JiaReBtn setImage:[UIImage imageNamed:@"JiaReBang_on.png"] forState:UIControlStateNormal];
|
int temp= (int)(TPlabel+0.5);
|
||||||
JiaReBtn.selected=YES;
|
NSString *stringFloat = [NSString stringWithFormat:@"%d",temp];
|
||||||
|
UILabel *lbl = [JiaReBtn viewWithTag:1];
|
||||||
|
if ([stateString6 isEqualToString:@"01"]){
|
||||||
|
//加热
|
||||||
|
lbl.textColor = JWUIColorFromRGB(0x38b9fc);
|
||||||
}else{
|
}else{
|
||||||
JiaReBtn.selected=NO;
|
lbl.textColor = [UIColor lightGrayColor];
|
||||||
[JiaReBtn setImage:[UIImage imageNamed:@"JiaReBang_off.png"] forState:UIControlStateNormal];
|
|
||||||
}
|
}
|
||||||
|
lbl.text = [NSString stringWithFormat:@"%@°C", stringFloat];
|
||||||
}
|
}
|
||||||
|
|
||||||
+(NSArray*)refreshSongNuoBD86TimerAddTempWithBackMassageModel:(SongNuoBDProtocol*)backModel
|
+(NSArray*)refreshSongNuoBD86TimerAddTempWithBackMassageModel:(SongNuoBDProtocol*)backModel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue