V5.0.0bug修复

This commit is contained in:
wbzhan
2019-08-29 14:07:40 +08:00
parent 23c5d6f60d
commit 685a2b8676
17 changed files with 247 additions and 485 deletions
@@ -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];
}
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -16,6 +16,7 @@
<outlet property="pwdTf" destination="kiH-bp-24Q" id="PIU-eW-NJW"/>
<outlet property="scrollView" destination="rVr-h5-uWd" id="xVI-ZH-ZBs"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outlet property="wifiNameTextField" destination="APB-5y-OkX" id="wmR-M6-TZY"/>
<outletCollection property="dashView" destination="g0t-sG-8Wn" id="LZL-DB-Zre"/>
<outletCollection property="dashView" destination="qEQ-pQ-mfJ" id="oNj-aK-CHc"/>
</connections>
@@ -29,7 +30,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Km-pH-09L">
<rect key="frame" x="0.0" y="35" width="375" height="251.5"/>
<rect key="frame" x="0.0" y="35" width="375" height="251"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="YQa-dk-iMD">
<rect key="frame" x="21" y="20" width="16" height="16"/>
@@ -39,38 +40,38 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="热点连接" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QfU-Iw-5Wj">
<rect key="frame" x="50" y="18.5" width="69.5" height="20.5"/>
<rect key="frame" x="50" y="18" width="69.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g0t-sG-8Wn" customClass="UIImageView">
<rect key="frame" x="38" y="61" width="299" height="1"/>
<rect key="frame" x="38" y="60.5" width="299" height="1"/>
<color key="backgroundColor" red="0.77127617390000003" green="0.77127617390000003" blue="0.77127617390000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Gkj-Pr-nXo"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请将手机连接至wifi:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kGw-DQ-YIO">
<rect key="frame" x="50" y="78" width="135" height="18"/>
<rect key="frame" x="50" y="77.5" width="135" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="连接说明书,请" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dSQ-fr-q0c">
<rect key="frame" x="50" y="109" width="107.5" height="18"/>
<rect key="frame" x="50" y="108.5" width="107.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ifish-xxxx" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dDg-6q-BXw">
<rect key="frame" x="193" y="78.5" width="62" height="17"/>
<rect key="frame" x="193" y="78" width="62" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WQq-Kn-abo">
<rect key="frame" x="157.5" y="103.5" width="72" height="29"/>
<rect key="frame" x="157.5" y="103" width="72" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="点击此处。"/>
<connections>
@@ -78,26 +79,26 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qEQ-pQ-mfJ" customClass="UIImageView">
<rect key="frame" x="38" y="148.5" width="299" height="1"/>
<rect key="frame" x="38" y="148" width="299" height="1"/>
<color key="backgroundColor" red="0.77127617390000003" green="0.77127617390000003" blue="0.77127617390000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="hPn-jR-jsT"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="路由器名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="63z-z9-F6B">
<rect key="frame" x="50" y="179.5" width="76.5" height="18"/>
<rect key="frame" x="50" y="179" width="76.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="路由器密码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="svD-TG-gy8">
<rect key="frame" x="50" y="213.5" width="76.5" height="18"/>
<rect key="frame" x="50" y="213" width="76.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="APB-5y-OkX">
<rect key="frame" x="134.5" y="175" width="188.5" height="28"/>
<rect key="frame" x="134.5" y="174" width="188.5" height="28"/>
<color key="backgroundColor" red="0.77127617390000003" green="0.77127617390000003" blue="0.77127617390000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="reY-Lx-dbw"/>
@@ -110,7 +111,7 @@
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kiH-bp-24Q">
<rect key="frame" x="134.5" y="209" width="188.5" height="28"/>
<rect key="frame" x="134.5" y="208" width="188.5" height="28"/>
<color key="backgroundColor" red="0.77127617390000003" green="0.77127617390000003" blue="0.77127617390000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -155,7 +156,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mTK-j3-V77">
<rect key="frame" x="36" y="304.5" width="303" height="30"/>
<rect key="frame" x="36" y="304" width="303" height="30"/>
<color key="backgroundColor" red="0.082352941176470587" green="0.66274509803921566" blue="0.92156862745098034" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="8Ra-AW-7XB"/>