iOS13,获取WiFi名称需定位;暗黑模式禁用

This commit is contained in:
wbzhan
2019-10-15 08:45:11 +08:00
parent d72f71f4df
commit 382d44ae13
4 changed files with 20 additions and 23 deletions
@@ -27,7 +27,7 @@
#import "IfishConnectingView.h"
#import "PushMasssageWebViewController.h"
#import "IfishUserObsever.h"
#import <CoreLocation/CoreLocation.h>
#import "ConnectHotpotViewController.h"
#import "ConAquarNowWiFiPwdVC.h"
@interface EspTouchDelegateImpl : NSObject<ESPTouchDelegate>
@@ -85,6 +85,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
@property(nonatomic,strong)IfishConnectingView *connectingView;
Strong CLLocationManager *locationManager;//iOS13,获取WiFi名称必须开启定位权限
@end
//extern BOOL formLogIn;//连接页面是否来自登录界面
@@ -100,11 +101,7 @@ extern BOOL isfromCameraView;
_deviceArry =[[NSMutableArray alloc]init];
[self updateUI];
[self getSSid];
//输入框在上面新UI 可去
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wifiviewkeyboradWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil];
_wifiTextFiled.delegate=self;
_wifiTextFiled.layer.masksToBounds=YES;
_wifiTextFiled.layer.cornerRadius=5;
@@ -115,17 +112,11 @@ extern BOOL isfromCameraView;
}
UIView*phoneView=[[UIView alloc]initWithFrame:CGRectMake(0,0, 9, 10)];
self.wifiTextFiled.leftView=phoneView;
self.wifiTextFiled.textColor = RGB_51;
self.wifiTextFiled.leftViewMode=UITextFieldViewModeAlways;
[self addTitleViewWithTitle:self.vcTitle];
// UIBarButtonItem*rightItem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"qr"] style:UIBarButtonItemStyleDone target:self action:@selector(rightButtonClickItem:)];
// self.navigationItem.rightBarButtonItem=rightItem;
//setBackButtonBackgroundImage:[backImage resizableImageWithCapInsets:UIEdgeInsetsMake(0,0,0,0)
//self.rightButton
//[self.rightItem setBackButtonTitlePositionAdjustment:UIOffsetMake(20,0) forBarMetrics:UIBarMetricsDefault];
//[self.rightItem setBackgroundVerticalPositionAdjustment:60 forBarMetrics:UIBarMetricsDefault];
self.rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
self.rightButton.frame = CGRectMake(0, 0, 50, 44);
@@ -142,6 +133,8 @@ extern BOOL isfromCameraView;
[self.shuoMingShuBtn addTarget:self action:@selector(shuoMingShuBtnAction:) forControlEvents:UIControlEventTouchUpInside];
[self creatConnectStateUI];
//获取WiFi名称
[self getSSid];
}
- (void)updateUI {
@@ -496,6 +489,15 @@ extern BOOL isfromCameraView;
// 5CCF7F0065CA
}
-(void)checkLocation{
NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
CGFloat version = [phoneVersion floatValue];
// 如果是iOS13 未开启地理位置权限 需要提示一下
if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined && version >= 13) {
self.locationManager = [[CLLocationManager alloc] init];
[self.locationManager requestWhenInUseAuthorization];
}
}
// refer to http://stackoverflow.com/questions/5198716/iphone-get-ssid-without-private-library
- (NSDictionary *)fetchNetInfo
{