文本和一键喂鱼未关联的提示

This commit is contained in:
祝发冬 2022-09-10 22:50:54 +08:00
parent 4ae0e07424
commit 30a4fdaeca
5 changed files with 21 additions and 9 deletions

View File

@ -16025,7 +16025,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;
@ -16144,7 +16144,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;

View File

@ -359,9 +359,9 @@
self.fishFeedModel=fishFeedModel;
NSString*tips=@"";
if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]&&[self.fishFeedModel.lightOpenStatus isEqualToString:@"00"])
if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"])
{
tips=@"请先添加喂鱼设置";
tips=@"请先添加喂鱼设置和关联";
}
else if ([self.dataModel.fishFeedStatus isEqualToString:@"00"])
{
@ -373,7 +373,7 @@
}
UIAlertController*alert=[UIAlertController alertControllerWithTitle:@"提示" message:tips preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction*okaction=[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]&&[self.fishFeedModel.lightOpenStatus isEqualToString:@"00"])
if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"])
{
XuanduofishFeedViewController *_settingVC = [[XuanduofishFeedViewController alloc] init];
_settingVC.currentdevice = self.currentDevice;

View File

@ -161,7 +161,7 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
label.textColor=[UIColor whiteColor];
label.font=[UIFont systemFontOfSize:12];
label.numberOfLines=0;
label.text=@"温度校准值需在±5℃以内超过±5℃请更换水温头,更换探头后,需点击取消校准按钮,清除上一次温度校准的误差值";
label.text=@"温度校准值需在±5℃以内超过±5℃请更换水温头,更换探头后,需点击取消校准按钮,清除上一次温度校准的误差值";
CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size;
label.frame=CGRectMake((self.view.frame.size.width-size.width)/2.0, CGRectGetMaxY(tempView.frame)+100, size.width, size.height);
[self.view addSubview:label];

View File

@ -178,14 +178,22 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
[self.tableView registerNib:[UINib nibWithNibName:addCellid bundle:nil] forCellReuseIdentifier:addCellid];
[self.tableView registerNib:[UINib nibWithNibName:cycleTimerflag bundle:nil] forCellReuseIdentifier:cycleTimerflag];
[self.tableView registerNib:[UINib nibWithNibName:setTimerflag bundle:nil] forCellReuseIdentifier:setTimerflag];
if (self.timerType==2)
if (self.timerType==2||self.timerType==3)
{
UILabel*label=[[UILabel alloc]initWithFrame:CGRectZero];
label.textColor=[UIColor whiteColor];
label.font=[UIFont systemFontOfSize:12];
label.numberOfLines=0;
label.text=@"开启时间为设备运行的时间,关闭时间为设备停止的时间,例如设置开启1小时关闭2小时设备将会运行1小时停止2小时以此规律循环运行。";
if (self.timerType==2)
{
label.text=@"开启时间为设备运行的时间,关闭时间为设备停止的时间,例如设置开启1小时关闭2小时设备将会运行1小时停止2小时以此规律循环运行。";
}
else if (self.timerType==3)
{
label.text=@"在定时自恢复模式下设定好定时时间段如果在定时开启的时间段内手动关闭设备10分钟以后会自动开启如果在关闭的时间段内手动开启设备10分钟以后会自动关闭。例如循环泵设定了2段定时分别为时段一8:00-12:00时段二15:00-20:00如果我们在8:00-12:00之间手动将循环泵关闭10分钟以后系统会自动将循环泵开启如果在12:00-15:00之间手动将循环泵打开10分钟以后系统会自动将循环泵关闭。如果不需要设备在定时时间段内自动恢复开启状态可在定时模式下设定时间。";
}
CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size;
label.frame=CGRectMake((kScreenWidth-size.width)/2.0, 300, size.width, size.height);
[self.view addSubview:label];

View File

@ -652,7 +652,11 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
NSString*binaryLightChooseStatus=[dataContorl getBinaryByHex:self.fishFeedModel.lightChooseStatus];
binaryLightChooseStatus =[binaryLightChooseStatus stringByReplacingCharactersInRange:NSMakeRange(location, 1) withString:btn.selected?@"1":@"0"];
if (binaryLightChooseStatus.length>location)
{
binaryLightChooseStatus =[binaryLightChooseStatus stringByReplacingCharactersInRange:NSMakeRange(location, 1) withString:btn.selected?@"1":@"0"];
}
NSString*hexLightChooseStatus=[dataContorl getHexByBinary:binaryLightChooseStatus];
self.fishFeedModel.lightChooseStatus=hexLightChooseStatus;
baseModel*readModel=[[baseModel alloc]init];