更换热点链接方式

This commit is contained in:
wbzhan
2019-09-30 13:30:50 +08:00
parent 41e5233e1f
commit bfdf208899
10 changed files with 259 additions and 62 deletions
@@ -37,9 +37,9 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
[self.connectWiFiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
make.bottom.mas_equalTo(-kSizeFrom750(60));
make.width.mas_equalTo(kSizeFrom750(400));
make.height.mas_equalTo(kSizeFrom750(60));
make.bottom.mas_equalTo(-30);
make.width.mas_equalTo(200);
make.height.mas_equalTo(30);
}];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillEnterForeground:) name:Noti_WillEnterForeground object:nil];
@@ -100,17 +100,17 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
}
}
-(void)checkWiFi{
// NSDictionary *ifs = [self getSSIDInfo];
// NSString *wifiName = [ifs objectForKey:@"SSID"];
// if ([wifiName rangeOfString:@"ifish-"].location!=NSNotFound) {
NSDictionary *ifs = [self getSSIDInfo];
NSString *wifiName = [ifs objectForKey:@"SSID"];
if ([wifiName rangeOfString:@"ifish-"].location!=NSNotFound) {
//wifi正确,则尝试连接设备
ConnectingAquarVC *connecting = InitObject(ConnectingAquarVC);
connecting.wifiName = self.wifiName;
connecting.wifiPassword = self.wifiPwd;
[self.navigationController pushViewController:connecting animated:YES];
// }else{
// [self.view makeToast:@"WiFi名称不匹配,请重试"];
// }
}else{
[self.view makeToast:@"WiFi名称不匹配,请重试"];
}
}
- (id)getSSIDInfo