From dd29df2e08ac87c878e26513f1b5ae06eae7a6d9 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期日, 25 六月 2023 19:54:32 +0800
Subject: [PATCH] feature UI调整
---
EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m | 40 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
index 37e9a63..cf24575 100644
--- a/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
+++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZAPWiFiConfigViewController.m
@@ -23,6 +23,14 @@
@property (weak, nonatomic) IBOutlet UILabel *stepTwoLabel;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *processingIndicator;
@property (weak, nonatomic) IBOutlet UIButton *addBtn;
+@property (unsafe_unretained, nonatomic) IBOutlet UILabel *stepThreeLable;
+@property (unsafe_unretained, nonatomic) IBOutlet UILabel *tipLable;
+@property (unsafe_unretained, nonatomic) IBOutlet UILabel *step1TipLable;
+@property (unsafe_unretained, nonatomic) IBOutlet UILabel *passwordLable;
+@property (unsafe_unretained, nonatomic) IBOutlet UILabel *nameL;
+
+@property (unsafe_unretained, nonatomic) IBOutlet UIButton *toCopBtn;
+@property (unsafe_unretained, nonatomic) IBOutlet UIButton *toSetBtn;
@property (nonatomic,copy) NSString *devicWifiName;
@property (nonatomic,strong) NSTimer *timer;
@@ -61,9 +69,12 @@
- (void) initSubviews
{
self.processingIndicator.hidden = YES;
- self.devicWifiName = [NSString stringWithFormat:@"EZVIZ_%@",[GlobalKit shareKit].deviceSerialNo];
+
+// self.devicWifiName = [NSString stringWithFormat:@"EZVIZ_%@",[GlobalKit shareKit].deviceSerialNo];
+ self.devicWifiName = [NSString stringWithFormat:@"%@_%@",[GlobalKit shareKit].WiFiConfigPrefix,[GlobalKit shareKit].deviceSerialNo];
self.wifiNameLabel.text = self.devicWifiName;
- self.wifiPwdLabel.text = [NSString stringWithFormat:@"EZVIZ_%@",[GlobalKit shareKit].deviceVerifyCode];
+// self.wifiPwdLabel.text = [NSString stringWithFormat:@"EZVIZ_%@",[GlobalKit shareKit].deviceVerifyCode];
+ self.wifiPwdLabel.text = [NSString stringWithFormat:@"%@_%@",[GlobalKit shareKit].WiFiConfigPrefix,[GlobalKit shareKit].deviceVerifyCode];
NSString *str = [NSString stringWithFormat:NSLocalizedString(@"wifi_step_two_msg",@"杩涘叆鎵嬫満绯荤粺Wi-Fi璁剧疆鐣岄潰锛岄�夋嫨鍚嶇О涓�%@鐨勭綉缁滐紝鐢ㄦ彁绀虹殑瀵嗙爜杩涜杩炴帴"),self.devicWifiName];
NSMutableAttributedString *aStr = [[NSMutableAttributedString alloc] initWithString:str];
@@ -78,6 +89,31 @@
[aStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [aStr length])];
self.stepTwoLabel.attributedText = aStr;
+
+ //绗笁姝�
+ NSString *stepThreeStr=HDLEZLocallizedString(@"wifi_config_step_three");
+ NSString *tipStr=HDLEZLocallizedString(@"wifi_config_step_three_tip");
+ NSString *step3FinalStr=[NSString stringWithFormat:@"%@ %@",stepThreeStr,tipStr];
+ NSMutableAttributedString *aTipStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@",stepThreeStr,tipStr]];
+ //鍏抽敭瀛楃棰滆壊璋冩暣
+ [aTipStr addAttribute:NSForegroundColorAttributeName
+ value:[UIColor redColor]
+ range:[step3FinalStr rangeOfString:tipStr]];
+ self.stepThreeLable.attributedText = aTipStr;
+ self.stepThreeLable.adjustsFontSizeToFitWidth=YES;
+
+
+ //璁剧疆鍥介檯鍖栬瑷�
+ self.tipLable.text=HDLEZLocallizedString(@"wifi_config_tip");
+ self.tipLable.adjustsFontSizeToFitWidth=YES;
+ self.step1TipLable.text=HDLEZLocallizedString(@"wifi_config_step_1_tips");
+ self.nameL.text=HDLEZLocallizedString(@"wifi_config_name");
+ self.passwordLable.text=HDLEZLocallizedString(@"wifi_config_step_2_password");
+ [self.toCopBtn setTitle:HDLEZLocallizedString(@"wifi_config_copy_pwd") forState:UIControlStateNormal];
+ [self.toSetBtn setTitle:HDLEZLocallizedString(@"wifi_config_to_setting") forState:UIControlStateNormal];
+ [self.addBtn setTitle:HDLEZLocallizedString(@"wifi_ap_add_device_title") forState:UIControlStateNormal];
+
+
}
-(void) startAction
--
Gitblit v1.8.0