修复一些问题
This commit is contained in:
parent
5263628f1f
commit
664f1024f2
|
|
@ -134,15 +134,14 @@
|
|||
float TPlabel=mac/10;
|
||||
int temp= (int)(TPlabel+0.5);
|
||||
NSString *stringFloat = [NSString stringWithFormat:@"%d",temp];
|
||||
[jiaReBang setImage:nil forState:UIControlStateNormal];
|
||||
|
||||
UILabel *lbl = [jiaReBang viewWithTag:1];
|
||||
if ([stateString6 isEqualToString:@"01"]){
|
||||
//加热
|
||||
[jiaReBang setTitleColor:JWUIColorFromRGB(0x38b9fc) forState:UIControlStateNormal];
|
||||
lbl.textColor = JWUIColorFromRGB(0x38b9fc);
|
||||
}else{
|
||||
[jiaReBang setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
|
||||
lbl.textColor = [UIColor lightGrayColor];
|
||||
}
|
||||
[jiaReBang setTitle:stringFloat forState:UIControlStateNormal];
|
||||
lbl.text = [NSString stringWithFormat:@"%@°C", stringFloat];
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
RuiMeiCHControl *runsunCH = [UserExtendataArchaver unArchiverRuiMeiDeviceCHInfo:macaddress];
|
||||
if (!runsunCH||[runsunCH isKindOfClass:[NSNull class]]) {
|
||||
runsunCH = [[RuiMeiCHControl alloc] init];
|
||||
runsunCH.ch1name = @"S1";
|
||||
runsunCH.ch2name = @"S2";
|
||||
runsunCH.ch1name = @"灯1";
|
||||
runsunCH.ch2name = @"灯2";
|
||||
runsunCH.ch3name = @"UV/杀菌";
|
||||
runsunCH.ch4name = @"冲浪/氧泵";
|
||||
runsunCH.jiaRe = @"加热棒";
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
cell.lineImgView.image = [UIImage imageNamed:@"redact_line_last"];
|
||||
|
||||
}
|
||||
NSArray *titles= @[@"S1",@"S2",@"UV/杀菌",@"冲浪/氧泵",@"加热棒"];
|
||||
NSArray *titles= @[@"灯1",@"灯2",@"UV/杀菌",@"冲浪/氧泵",@"加热棒"];
|
||||
if (indexPath.section==1) {
|
||||
cell.chTitle.text = titles[indexPath.row];
|
||||
}
|
||||
|
|
@ -93,11 +93,11 @@
|
|||
RuiMeiCHControl *ruSunch = [[RuiMeiCHControl alloc] init];
|
||||
RuSunChangeNameTextViewCell*cell1 = [self.view viewWithTag:RUSUNCHCELL_CH1];
|
||||
if (cell1.chName.text.length>3) {
|
||||
[self.view makeToast:@"S1不能超过3个字"];
|
||||
[self.view makeToast:@"灯1不能超过3个字"];
|
||||
return;
|
||||
}
|
||||
if (cell1.chName.text.length==0) {
|
||||
[self.view makeToast:@"S1不能为空"];
|
||||
[self.view makeToast:@"灯1不能为空"];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -470,6 +470,10 @@
|
|||
|
||||
-(void)btnCliCk:(UIButton*)btn{
|
||||
|
||||
if (self.customModeOn) {
|
||||
return;
|
||||
}
|
||||
|
||||
TimerSateModel*stateModel=[[TimerSateModel alloc]init];
|
||||
stateModel.sendmacId = self.currentdevice.macAddress;
|
||||
stateModel.resavemacId =self.currentdevice.macAddress;
|
||||
|
|
@ -771,7 +775,9 @@
|
|||
|
||||
}else if (indexPath.section!=0){
|
||||
|
||||
|
||||
if (self.customModeOn) {
|
||||
return;
|
||||
}
|
||||
|
||||
_mydatepicView=[[MydatePickerView alloc]init];
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@
|
|||
//textLbl.backgroundColor = [UIColor blackColor];
|
||||
self.chName.textColor = [UIColor colorWithRed:250/255.0f green:255/255.0f blue:255/254.0f alpha:1];
|
||||
self.chName.textAlignment = NSTextAlignmentCenter;
|
||||
NSArray *arr = @[@"S1",@"S2",@"UV/杀菌"];
|
||||
NSArray *arr = @[@"灯1",@"灯2",@"UV/杀菌"];
|
||||
self.chName.text = arr[i];
|
||||
|
||||
self.chName.font = [UIFont boldSystemFontOfSize:14];
|
||||
|
|
@ -165,11 +165,21 @@
|
|||
self.button.frame = CGRectMake(btnControlPlace +i*(btnControlPlace + btnControlWith), kScreenSize.height - 2*btnControlPlace - btnControlWith -25 -5 , btnControlWith, btnControlWith + 11);
|
||||
|
||||
|
||||
[self.button setBackgroundImage:[UIImage imageNamed:nameArr[i+3]]forState:UIControlStateNormal];
|
||||
[self.button setImage:[UIImage imageNamed:nameArr[i+3]]forState:UIControlStateNormal];
|
||||
|
||||
self.button.tag= 6003+i;
|
||||
[self.button addTarget:self action:@selector(controlBtnCilck:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
if (i == 1) {
|
||||
UILabel *tempLbl = [UILabel new];
|
||||
[self.button addSubview:tempLbl];
|
||||
tempLbl.tag = 1;
|
||||
tempLbl.font = [UIFont boldSystemFontOfSize:14];
|
||||
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), kScreenSize.height - 2*btnControlPlace - btnControlWith -35 + btnControlWith, btnControlWith, btnControlPlace - 5)];
|
||||
//textLbl.backgroundColor = [UIColor blackColor];
|
||||
textLbl.textAlignment = NSTextAlignmentCenter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue