V5.0.0bug修复
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *dashView;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *pwdTf;
|
||||
@property (weak, nonatomic) IBOutlet UIView *containerView;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *wifiNameTextField;
|
||||
|
||||
@property (nonatomic, strong) ESPTouchTask* epTask;
|
||||
|
||||
@@ -43,6 +44,8 @@
|
||||
|
||||
@property (nonatomic, assign) NSInteger retryTimes;
|
||||
|
||||
Copy NSString *wifiName;//当前wifi名称
|
||||
|
||||
@end
|
||||
|
||||
@implementation ConnectHotpotViewController
|
||||
@@ -72,8 +75,26 @@
|
||||
UIBarButtonItem * backItem=[[UIBarButtonItem alloc] initWithCustomView:back];
|
||||
|
||||
self.navigationItem.leftBarButtonItem=backItem;
|
||||
|
||||
NSDictionary *wifiDic = [self fetchSSIDInfo];
|
||||
NSString *wifiName = [wifiDic objectForKey:@"SSID"];
|
||||
self.wifiNameTextField.text = wifiName;
|
||||
}
|
||||
//获取当前链接WiFi信息
|
||||
- (id)fetchSSIDInfo
|
||||
{
|
||||
NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces());
|
||||
NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
|
||||
id info = nil;
|
||||
for (NSString *ifnam in ifs) {
|
||||
info = (id)CFBridgingRelease(CNCopyCurrentNetworkInfo((CFStringRef)ifnam));
|
||||
if (info && [info count]) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return info ;
|
||||
}
|
||||
|
||||
-(void)clickBack{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user