文字描述修改,去除AP模式第二次wifi跳转
This commit is contained in:
parent
2cc86fb124
commit
27ddecac30
|
|
@ -15431,7 +15431,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
@ -15548,7 +15548,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
@ -15633,7 +15633,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = isfishAppstoreDistribution;
|
||||
PROVISIONING_PROFILE_SPECIFIER = production2;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
|
|||
|
||||
if (self.deviceType==DEVICECAMERA)
|
||||
{
|
||||
tip1=@"1.请长按摄像头背后复位孔,复位摄像头,复位后15秒内断电通电3次进入热点模式;";
|
||||
tip2=@"2.点击去设置:设置-WiFi-选择GW-AP-xxx的网络,一般无密码或12345678或查看说明书,连接好后返回爱奇鱼app。";
|
||||
}
|
||||
NSArray*textArr=@[tip1,tip2];
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#import "MMProgressHUD.h"
|
||||
#import "MMProgressHUDOverlayView.h"
|
||||
#import "ConAquarNowWiFiPwdVC.h"
|
||||
enum
|
||||
{
|
||||
conectType_Intelligent,
|
||||
|
|
@ -41,7 +42,7 @@ enum
|
|||
|
||||
@property(nonatomic,strong) UILabel *redTipLable;
|
||||
@property (nonatomic) int conectType; //2AP 1-二维码扫描 0-智能联机
|
||||
|
||||
@property (strong, nonatomic) UILabel *attentionLabel;
|
||||
@property (strong, nonatomic) NSString *lastSetPassword;
|
||||
//点击确定绑定后 不让操作返回 和查看说明
|
||||
@property (nonatomic) BOOL canDissMissController;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
//智能联机
|
||||
self.isDeviceLinkIn = NO;
|
||||
[GWP2PDeviceLinker shareInstance].delegate=self;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillEnterForeground:) name:Noti_WillEnterForeground object:nil];
|
||||
//[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillEnterForeground:) name:Noti_WillEnterForeground object:nil];
|
||||
self.addresses = [[NSMutableDictionary alloc] initWithCapacity:1];
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
[self addTitleViewWithTitle:@"连接摄像头"];
|
||||
|
|
@ -76,6 +76,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
_canDissMissController = YES;
|
||||
//添加警告内容
|
||||
[self redTipLable];
|
||||
// [self tipsLabelAndButton];
|
||||
|
||||
if (self.conectType==conectType_ap&&self.wifiPwd.length&&self.wifiPwd.length)
|
||||
{
|
||||
|
|
@ -98,6 +99,26 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
}
|
||||
return _redTipLable;
|
||||
}
|
||||
-(void)tipsLabelAndButton
|
||||
{
|
||||
CGFloat y = CGRectGetMaxY(self.redTipLable.frame) + 5;
|
||||
UILabel* tipLable=[[UILabel alloc]initWithFrame:CGRectMake(19, y, 100, 10)];
|
||||
tipLable.text=@"(如有问题,请尝试热点连接模式)";
|
||||
tipLable.font=[UIFont systemFontOfSize:13];
|
||||
tipLable.textColor=[UIColor lightGrayColor];
|
||||
[tipLable sizeToFit];
|
||||
[self.view addSubview:tipLable];
|
||||
[self.view bringSubviewToFront:tipLable];
|
||||
|
||||
UIButton*button=[UIButton buttonWithType:UIButtonTypeCustom];
|
||||
button.frame=CGRectMake(CGRectGetMaxX(tipLable.frame), CGRectGetMinY(tipLable.frame), 60, 10);
|
||||
button.titleLabel.font=[UIFont systemFontOfSize:13];
|
||||
[button setTitle:@"点击这里" forState:UIControlStateNormal];
|
||||
[button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
|
||||
[button addTarget:self action:@selector(goAPmode) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:button];
|
||||
|
||||
}
|
||||
//获取WiFi信息
|
||||
- (id)fetchSSIDInfo
|
||||
{
|
||||
|
|
@ -233,8 +254,14 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
//波纹
|
||||
self.waveProgressView = [[LXWaveProgressView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.wifiSecFiled.frame) +10, kScreenSize.width,CGRectGetMinY(backImg.frame) - CGRectGetMaxY(self.wifiSecFiled.frame))];
|
||||
|
||||
self.attentionLabel=[[UILabel alloc]initWithFrame:CGRectMake(30, CGRectGetMidY(self.waveProgressView.frame), kScreenWidth-60, 130)];
|
||||
self.attentionLabel.font=[UIFont systemFontOfSize:13];
|
||||
self.attentionLabel.textColor=[UIColor blackColor];
|
||||
self.attentionLabel.numberOfLines=0;
|
||||
self.attentionLabel.text=@"1、请长按摄像头背后复位孔,复位摄像头。\n2、若Wifi名称有中文,请改成英文字母加数字。\n3、Wifi密码不能包含特殊符号(如,.!@等)。\n4、若多次智能连接未成功,请尝试热点模式连接。";
|
||||
[self.view addSubview:self.waveProgressView];
|
||||
[self.view bringSubviewToFront:self.waveProgressView];
|
||||
[self.view addSubview:self.attentionLabel];
|
||||
|
||||
|
||||
|
||||
|
|
@ -272,7 +299,17 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
|
||||
|
||||
#pragma mark- 点击确定
|
||||
|
||||
-(void)goAPmode
|
||||
{
|
||||
ConAquarNowWiFiPwdVC *vc = InitObject(ConAquarNowWiFiPwdVC);
|
||||
vc.deviceType=DEVICECAMERA;
|
||||
NSDictionary *netInfo = [CommonUtils getSSIDInfo];
|
||||
vc.ssid = [netInfo objectForKey:@"SSID"];
|
||||
vc.bssid = [netInfo objectForKey:@"BSSID"];
|
||||
|
||||
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(void)sBtn:(UIButton*)btn{
|
||||
NSString *ssidName = [self.wifiName substringWithRange:NSMakeRange(self.wifiName.length-2, 2)];
|
||||
if ([ssidName.uppercaseString isEqualToString:@"5G"]) {
|
||||
|
|
@ -330,14 +367,14 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
self.lastSetPassword = [Utils GetTreatedPassword:newPassword];
|
||||
}
|
||||
#pragma mark---到前台,搜索设备
|
||||
-(void)viewWillEnterForeground:(NSNotification *)noti{
|
||||
|
||||
if (self.deviceID.length&&!self.isDeviceLinkIn)
|
||||
{
|
||||
[GWP2PDeviceLinker shareInstance].delegate=self;
|
||||
[[GWP2PDeviceLinker shareInstance] forceScanLanDevices];
|
||||
}
|
||||
}
|
||||
//-(void)viewWillEnterForeground:(NSNotification *)noti{
|
||||
//
|
||||
// if (self.deviceID.length&&!self.isDeviceLinkIn)
|
||||
// {
|
||||
// [GWP2PDeviceLinker shareInstance].delegate=self;
|
||||
// [[GWP2PDeviceLinker shareInstance] forceScanLanDevices];
|
||||
// }
|
||||
//}
|
||||
|
||||
#pragma mark - 搜索到设备,弹出添加设备提示 暂不用
|
||||
/**
|
||||
|
|
@ -347,8 +384,8 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
*/
|
||||
- (void)p2pDeviceLinker:(GWP2PDeviceLinker *)linker deviceLinkSuccess:(NSDictionary *)deviceDict
|
||||
{
|
||||
NSLog(@"扫描到设备");
|
||||
[self deviceLinkin:deviceDict linkType:self.conectType];
|
||||
// NSLog(@"扫描到设备");
|
||||
// [self deviceLinkin:deviceDict linkType:self.conectType];
|
||||
}
|
||||
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
|
||||
|
||||
|
|
@ -469,19 +506,8 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
{
|
||||
|
||||
weakSelf.deviceID=deviceId;
|
||||
[weakSelf.view makeToast:[NSString stringWithFormat:@"设备即将连接网络,请将手机重新连接到%@",weakSelf.wifiName]];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
|
||||
if([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
|
||||
}else {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
// [weakSelf.view makeToast:[NSString stringWithFormat:@"设备即将连接网络,请将手机重新连接到%@",weakSelf.wifiName]];
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -501,7 +527,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
|||
-(void)smartLinkConnect{
|
||||
WEAK_SELF;
|
||||
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(90 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(100 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self deviceLinkinTimeout:self.conectType];
|
||||
});
|
||||
[[GWP2PDeviceLinker shareInstance] p2pSmartLinkDeviceWithWiFiSSID:weakSelf.wifiName password:weakSelf.wifiPwd useSimpleConfig:YES deviceLinkIn:^(NSDictionary *deviceDict) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
- (IBAction)makeSureButton:(id)sender;
|
||||
|
||||
- (IBAction)lickHereBtnClicked:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *attentionLabel;
|
||||
|
||||
@property(nonatomic,strong)NSString*ssid;
|
||||
@property(nonatomic,strong)NSString*bssid;
|
||||
|
|
|
|||
|
|
@ -146,8 +146,11 @@ extern BOOL isfromCameraView;
|
|||
}
|
||||
self.nodImg.frame = CGRectMake(12, yOffset, 10, 10);
|
||||
self.wifiNamelabel.frame = CGRectMake(23, yOffset - 18 + 5, 336, 36);
|
||||
self.attentionLabel.frame=CGRectMake(30, CGRectGetMidY(self.waveProgressView.frame), kScreenWidth-60, 130);
|
||||
[self.view bringSubviewToFront:self.attentionLabel];
|
||||
[self.view bringSubviewToFront:self.connectTipLbl];
|
||||
[self.view bringSubviewToFront:self.connectBtn];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SecondConnectWifiController">
|
||||
<connections>
|
||||
<outlet property="attentionLabel" destination="A0g-TD-kzl" id="L5B-mU-nX8"/>
|
||||
<outlet property="connectBtn" destination="eDA-Ia-DAy" id="twz-Z9-3oO"/>
|
||||
<outlet property="connectTipLbl" destination="dwN-It-iak" id="hMH-hE-W8C"/>
|
||||
<outlet property="nodImg" destination="ZVX-4y-CYu" id="XQa-yT-9oP"/>
|
||||
|
|
@ -76,7 +75,7 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="linkingdevice_point.png" translatesAutoresizingMaskIntoConstraints="NO" id="ZVX-4y-CYu">
|
||||
<rect key="frame" x="13" y="24" width="9" height="9"/>
|
||||
<rect key="frame" x="3" y="24" width="19" height="19"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(暂不支持5G网络,请使用2.4G网络)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Djf-KM-um4">
|
||||
<rect key="frame" x="23" y="96.5" width="224" height="16"/>
|
||||
|
|
@ -85,12 +84,23 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pAw-UG-caT">
|
||||
<rect key="frame" x="267" y="48.5" width="93" height="44"/>
|
||||
<rect key="frame" x="267" y="48.5" width="93" height="88"/>
|
||||
<state key="normal" title="确定" backgroundImage="linkingdevice_botton.png"/>
|
||||
<connections>
|
||||
<action selector="makeSureButton:" destination="-1" eventType="touchUpInside" id="MmM-3q-5Lu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A0g-TD-kzl" userLabel="attentionLabel">
|
||||
<rect key="frame" x="10" y="245" width="355" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<string key="text">1、请将插排通电,长按复位键或开关绑定键(指示灯开始闪烁为复位成功)。
|
||||
2、若Wifi名称有中文,请改成英文字母加数字。
|
||||
3、Wifi密码不能包含特殊符号(如,.!@等)。
|
||||
4、若多次智能连接未成功,请尝试热点模式连接。</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
|
|
@ -117,8 +127,8 @@
|
|||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="linkingdevice_botton.png" width="84" height="44"/>
|
||||
<image name="linkingdevice_point.png" width="9" height="9"/>
|
||||
<image name="linkingdevice_setting.png" width="360" height="404"/>
|
||||
<image name="linkingdevice_botton.png" width="84.5" height="44"/>
|
||||
<image name="linkingdevice_point.png" width="9.5" height="9.5"/>
|
||||
<image name="linkingdevice_setting.png" width="360" height="404.5"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
Loading…
Reference in New Issue