From a0e5554d26c5753e160f459520c49c33647971d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E5=8F=91=E5=86=AC?= Date: Mon, 19 Dec 2022 12:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=EF=BC=8C=E5=AE=A0=E7=89=A9=E7=AC=BC=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ifish.xcodeproj/project.pbxproj | 4 +- Ifish/Common/CommonUtils.m | 11 +-- Ifish/Info.plist | 2 + .../XuTo/Xuanduo2SettingController.m | 96 +++++++++---------- .../XuTo/XuanduoTimerSettingViewController.m | 2 +- 5 files changed, 54 insertions(+), 61 deletions(-) diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index b7aad42..dec2942 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -16025,7 +16025,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; @@ -16145,7 +16145,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; diff --git a/Ifish/Common/CommonUtils.m b/Ifish/Common/CommonUtils.m index 1acb157..1bfe7fb 100644 --- a/Ifish/Common/CommonUtils.m +++ b/Ifish/Common/CommonUtils.m @@ -749,14 +749,11 @@ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { NSString *BSSID = @""; NSString *SSID = @""; - - switch ([[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) + NetworkStatus status = [[Reachability reachabilityForInternetConnection] currentReachabilityStatus]; + switch (status) { - case NotReachable:// 没有网络 - { - netconnType = @"no network"; - } - break; + case NotReachable:// 没有网络,也获取一下 + case ReachableViaWiFi:// Wifi { netconnType = @"Wifi"; diff --git a/Ifish/Info.plist b/Ifish/Info.plist index bffe7f3..4304773 100644 --- a/Ifish/Info.plist +++ b/Ifish/Info.plist @@ -380,6 +380,8 @@ NSCameraUsageDescription 爱鱼奇需要您的同意,才能使用相机,以使用图片上传或扫一扫等功能 + NSLocationAlwaysAndWhenInUseUsageDescription + 为获取爱鱼奇智能硬件产品及用户的地址区域分布,以提供更好的特色服务,爱鱼奇将获取您的地址 NSLocalNetworkUsageDescription 为给爱鱼奇智能硬件产品配置网络,发送指令等,需要使用本地网络 NSLocationAlwaysUsageDescription diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m index 17a0f41..d85960d 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m @@ -194,6 +194,7 @@ static NSString *setTimerflag = @"SetTimerCell"; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0){ TemperatureSetCell *cell = [tableView dequeueReusableCellWithIdentifier:temperatureCellid]; + cell.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"set_cellBack"]]; TemperatureSetModel *model=[[TemperatureSetModel alloc]init]; model.title = @"预警设置"; cell.titleLabel.text = model.title; @@ -355,6 +356,25 @@ static NSString *setTimerflag = @"SetTimerCell"; [cell configTitleLabel:@"循环开关" timer:[NSString stringWithFormat:@"持续时长%d分钟",[dataContorl hexToTen:model.lastTime]] switchStatus:isOn]; + if (indexPath.section==1+_titieArr.count) + { + if(_selectSection == indexPath.section) + { + cell.backImageView.image=[UIImage imageNamed:@"bottomRound"]; + } + else + { + + cell.backImageView.image=[UIImage imageNamed:@"ifishSetCell_back.png"]; + } + + } + else + { + + cell.backImageView.image=[UIImage imageNamed:@"ifishSetCell_back.png"]; + } + cell.selectionStyle = UITableViewCellSelectionStyleNone; } @@ -420,75 +440,48 @@ static NSString *setTimerflag = @"SetTimerCell"; } - (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - if (section == 0) { + if (section == 0||([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]&§ion==5)) { UIView *oneHeader = [[UIView alloc] init]; oneHeader.backgroundColor = COLOR_MIAN; return oneHeader; - }else if(section == 2){ + } + else if(section > 1){ XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; - headerView.controlBtn.tag = kBtnTag + section; - if (_selectSection == section) { - headerView.controlBtn.selected = YES; - } - [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; - [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; - return headerView; - }else if(section == 3){ - XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; - headerView.controlBtn.tag = kBtnTag + section; - if (_selectSection == section) { - headerView.controlBtn.selected = YES; - } - [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; - [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; - return headerView; - }else if(section == 4){ - XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; - headerView.controlBtn.tag = kBtnTag + section; - if (_selectSection == section) { - headerView.controlBtn.selected = YES; - } - [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; - [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; - return headerView; - }else if(section == 5){ - if ([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]) + + headerView.backImageView.image=[UIImage imageNamed:@"centerrect"]; + if (section==2) { - UIView *oneHeader = [[UIView alloc] init]; - oneHeader.backgroundColor = COLOR_MIAN; - return oneHeader; + headerView.backImageView.image=[UIImage imageNamed:@"topround"]; } - else + if (section==1+_titieArr.count) { - XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; - headerView.controlBtn.tag = kBtnTag + section; - if (_selectSection == section) { - headerView.controlBtn.selected = YES; + if(_selectSection == section) + { + headerView.backImageView.image=[UIImage imageNamed:@"centerrect"]; } - [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; - [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; - return headerView; + else + { + headerView.backImageView.image=[UIImage imageNamed:@"bottomRound"]; + } + } - }else if(section == 6){ - XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; - headerView.controlBtn.tag = kBtnTag + section; - if (_selectSection == section) { - headerView.controlBtn.selected = YES; - } - [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; - [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; - return headerView; - }else if(section == 7){ - XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; headerView.controlBtn.tag = kBtnTag + section; if (_selectSection == section) { headerView.controlBtn.selected = YES; } + [headerView.controlBtn setImage:[UIImage imageNamed:@"arrow_right"] forState:UIControlStateNormal]; + // headerView.backImageView.image=[UIImage imageNamed:@"矩形"]; [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; return headerView; + }else + { + UIView *oneHeader = [[UIView alloc] init]; + oneHeader.backgroundColor = COLOR_MIAN; + return oneHeader; } + return nil; } @@ -1322,6 +1315,7 @@ static NSString *setTimerflag = @"SetTimerCell"; NSLog(@"minstring = %@",minString); NSData*tempData=[dataContorl stringToHexData:minString]; [[Socketsingleton sharedInstance] soketWriteData:tempData]; + [_indicatorView startAnimating]; } diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m index 5612df0..eae5b34 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m @@ -195,7 +195,7 @@ static NSString *cycleTimerflag = @"CycleTimerCell"; } 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, kScreenHeight-NavigationBarHeight-size.height-88, size.width, size.height); + label.frame=CGRectMake((kScreenWidth-size.width)/2.0, kScreenHeight-NavigationBarHeight-size.height, size.width, size.height); [self.view addSubview:label]; } }