diff --git a/Ifish/controllers/leftcontrollers/ConfigWifiViewController.m b/Ifish/controllers/leftcontrollers/ConfigWifiViewController.m index 9893521..8cbf0bd 100644 --- a/Ifish/controllers/leftcontrollers/ConfigWifiViewController.m +++ b/Ifish/controllers/leftcontrollers/ConfigWifiViewController.m @@ -224,18 +224,39 @@ extern BOOL isfromCameraView; return; } WEAK_SELF; + NSString*red =@"2、先长按插座复位键3秒,松手后红灯绿灯同时 闪烁,再点确定按钮。"; + NSString* tips = @"提示:由于新版APP升级,产品包装盒内的说明书可能与新版APP联网方式不同,请以APP界面提示内容为准,也可查看右上角视频教程。"; + + + NSString*red2 =@"2、先长按插座复位键13秒左右,松手后红灯绿灯同时熄灭,只有绿灯偶尔闪烁,再点下一步。"; + NSString* tips2 = @"提示:由于新版APP升级,产品包装盒内的说明书可能与新版APP联网方式不同,请以APP界面提示内容为准,也可查看右上角视频教程。"; NSString*airkisTitle = @"一键联网"; NSString*smartTitle = @"快捷联网"; NSString*apTitle = @"AP联网"; - NSString*airkisTips = @"1、插座仅支持2.4G的WiFi网络,不支持5G 及 双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时 闪烁,再点确定按钮。\n3、如多次尝试一键联网都不成功,可切换其他 联网方式,每次重新连接时插座需断一次电然后重新复位连接。"; + NSString*airkisTips = @"1、插座仅支持2.4G的WiFi网络,不支持5G 及 双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时 闪烁,再点确定按钮。\n3、如多次尝试一键联网都不成功,可切换其他 联网方式,每次重新连接时插座需断一次电然后重新复位连接。\n\n提示:由于新版APP升级,产品包装盒内的说明书可能与新版APP联网方式不同,请以APP界面提示内容为准,也可查看右上角视频教程。"; NSString*smartTips = airkisTips; - NSString*apTips = @"1、插座仅支持2.4G的WiFi网络,不支持5G 及 双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键13秒左右,松手后红灯绿灯同时熄灭,只有绿灯偶尔闪烁,再点下一步。"; + NSString*apTips = @"1、插座仅支持2.4G的WiFi网络,不支持5G 及 双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键13秒左右,松手后红灯绿灯同时熄灭,只有绿灯偶尔闪烁,再点下一步。\n\n提示:由于新版APP升级,产品包装盒内的说明书可能与新版APP联网方式不同,请以APP界面提示内容为准,也可查看右上角视频教程。"; + NSMutableAttributedString*attair = [[NSMutableAttributedString alloc]initWithString:airkisTips attributes:@{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:[UIFont systemFontOfSize:16]}]; + [attair addAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} range:[airkisTips rangeOfString:red]]; + [attair addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11]} range:[airkisTips rangeOfString:tips]]; + + + + NSMutableAttributedString*attap = [[NSMutableAttributedString alloc]initWithString:apTips attributes:@{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:[UIFont systemFontOfSize:16]}]; + [attap addAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} range:[apTips rangeOfString:red2]]; + [attap addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11]} range:[apTips rangeOfString:tips2]]; + + + SPAlertController*alert =[SPAlertController alertControllerWithTitle:nil message:nil preferredStyle:SPAlertControllerStyleActionSheet animationType:SPAlertAnimationTypeDefault]; SPAlertAction*airkiss =[SPAlertAction actionWithTitle:airkisTitle style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) { [weakSelf connectNormalView]; weakSelf.connectType = ConnectTypeAirKiss; weakSelf.connectTypeTitle.text = airkisTitle; - weakSelf.connectTipLbl.text = airkisTips; + weakSelf.connectTipLbl.text = nil; + weakSelf.connectTipLbl.attributedText = attair; + //展示一键联网 + weakSelf.shuoMingShuBtn.hidden = NO; [weakSelf.connectBtn setTitle:@"确定" forState:UIControlStateNormal]; }]; @@ -243,16 +264,22 @@ extern BOOL isfromCameraView; SPAlertAction*smart =[SPAlertAction actionWithTitle:smartTitle style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) { [weakSelf connectNormalView]; weakSelf.connectType = ConnectTypeSmartConfig; + weakSelf.shuoMingShuBtn.hidden = YES; weakSelf.connectTypeTitle.text = smartTitle; - weakSelf.connectTipLbl.text = smartTips; + weakSelf.connectTipLbl.text = nil; + weakSelf.connectTipLbl.attributedText = attair; + [weakSelf.connectBtn setTitle:@"确定" forState:UIControlStateNormal]; }]; SPAlertAction*ap =[SPAlertAction actionWithTitle:apTitle style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) { [weakSelf connectNormalView]; weakSelf.connectType = ConnectTypeAP; + weakSelf.shuoMingShuBtn.hidden = YES; weakSelf.connectTypeTitle.text = apTitle; - weakSelf.connectTipLbl.text = apTips; + weakSelf.connectTipLbl.text = nil; + weakSelf.connectTipLbl.attributedText = attap; + [weakSelf.connectBtn setTitle:@"下一步" forState:UIControlStateNormal]; }]; SPAlertAction*cancel =[SPAlertAction actionWithTitle:@"取消" style:SPAlertActionStyleCancel handler:^(SPAlertAction * _Nonnull action) { diff --git a/Ifish/controllers/leftcontrollers/ConfigWifiViewController.xib b/Ifish/controllers/leftcontrollers/ConfigWifiViewController.xib index 37be249..d2511e5 100644 --- a/Ifish/controllers/leftcontrollers/ConfigWifiViewController.xib +++ b/Ifish/controllers/leftcontrollers/ConfigWifiViewController.xib @@ -114,7 +114,7 @@