| | |
| | | #import "DDKit.h" |
| | | #import "EZWifiConfigViewController.h" |
| | | #import "EZAPWiFiConfigViewController.h" |
| | | #import "GlobalKit.h" |
| | | |
| | | #define WIFI_PREFROOT_URL @"prefs:root=WIFI" |
| | | #define WIFI_IOS10_WIFI_URL @"App-Prefs:root=WIFI" |
| | |
| | | [self.nameTextField dd_addCornerRadius:4.0f lineColor:[UIColor lightGrayColor]]; |
| | | [self.passwordTextField dd_addCornerRadius:4.0f lineColor:[UIColor lightGrayColor]]; |
| | | [self.nextButton dd_addCornerRadius:19.0 lineColor:[UIColor dd_hexStringToColor:@"0x1b9ee2"]]; |
| | | |
| | | self.tipsLabel.text=HDLEZLocallizedString(@"wifi_config_step_2_tips"); |
| | | self.tipsLabel.adjustsFontSizeToFitWidth=YES; |
| | | |
| | | [self.nextButton setTitle:HDLEZLocallizedString(@"wifi_config_step_2_next_step") forState:UIControlStateNormal]; |
| | | |
| | | self.nameLabel.text=HDLEZLocallizedString(@"wifi_config_step_2_net"); |
| | | self.passwordLabel.text=HDLEZLocallizedString(@"wifi_config_step_2_password"); |
| | | |
| | | } |
| | | |
| | | - (void) viewWillAppear:(BOOL)animated |
| | |
| | | for (NSString *ifnam in interfaces) |
| | | { |
| | | NSDictionary *info = CFBridgingRelease(CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam)); |
| | | HDLEZLog(@"info:%@",info); |
| | | self.nameTextField.text = info[@"SSID"]; |
| | | break; |
| | | } |
| | |
| | | |
| | | - (IBAction)nextAction:(id)sender |
| | | { |
| | | //热点配网 |
| | | [self performSegueWithIdentifier:@"go2APWifiConfig" sender:nil]; |
| | | if ([GlobalKit shareKit].deviceType==HDLEZDeviceType_Door) {//为门锁 |
| | | //热点配网 |
| | | [self performSegueWithIdentifier:@"go2APWifiConfig" sender:nil]; |
| | | }else{ |
| | | [self showModeSelect]; |
| | | } |
| | | |
| | | // [self showModeSelect]; |
| | | |
| | | } |
| | | |
| | | @end |