Commit e10ed80ed3d430832efac96d501e1db7d03c84b8
Exists in
newLive
Merge branch 'newLive' of http://git.shunzhi.net/iosgroup/newlive into newLive
Showing
13 changed files
with
479 additions
and
55 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj
@@ -130,6 +130,7 @@ | @@ -130,6 +130,7 @@ | ||
130 | BF25E0171DDAAF73003EC0C1 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BF25E0101DDAAF73003EC0C1 /* SVProgressHUD.bundle */; }; | 130 | BF25E0171DDAAF73003EC0C1 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BF25E0101DDAAF73003EC0C1 /* SVProgressHUD.bundle */; }; |
131 | BF25E0181DDAAF73003EC0C1 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */; }; | 131 | BF25E0181DDAAF73003EC0C1 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */; }; |
132 | BF25E0191DDAAF73003EC0C1 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */; }; | 132 | BF25E0191DDAAF73003EC0C1 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */; }; |
133 | + BF29F9081ED6ACC2004667AF /* NewLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */; }; | ||
133 | BF3E4A771E2F30B700D90659 /* 观看人数.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A721E2F30B700D90659 /* 观看人数.png */; }; | 134 | BF3E4A771E2F30B700D90659 /* 观看人数.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A721E2F30B700D90659 /* 观看人数.png */; }; |
134 | BF3E4A781E2F30B700D90659 /* 礼物数量.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A731E2F30B700D90659 /* 礼物数量.png */; }; | 135 | BF3E4A781E2F30B700D90659 /* 礼物数量.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A731E2F30B700D90659 /* 礼物数量.png */; }; |
135 | BF3E4A791E2F30B700D90659 /* 上传封面.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A741E2F30B700D90659 /* 上传封面.png */; }; | 136 | BF3E4A791E2F30B700D90659 /* 上传封面.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A741E2F30B700D90659 /* 上传封面.png */; }; |
@@ -463,6 +464,7 @@ | @@ -463,6 +464,7 @@ | ||
463 | BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; }; | 464 | BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; }; |
464 | BF25E0131DDAAF73003EC0C1 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; }; | 465 | BF25E0131DDAAF73003EC0C1 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; }; |
465 | BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; }; | 466 | BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; }; |
467 | + BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewLoginViewController.swift; sourceTree = "<group>"; }; | ||
466 | BF3E4A721E2F30B700D90659 /* 观看人数.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "观看人数.png"; sourceTree = "<group>"; }; | 468 | BF3E4A721E2F30B700D90659 /* 观看人数.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "观看人数.png"; sourceTree = "<group>"; }; |
467 | BF3E4A731E2F30B700D90659 /* 礼物数量.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "礼物数量.png"; sourceTree = "<group>"; }; | 469 | BF3E4A731E2F30B700D90659 /* 礼物数量.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "礼物数量.png"; sourceTree = "<group>"; }; |
468 | BF3E4A741E2F30B700D90659 /* 上传封面.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "上传封面.png"; sourceTree = "<group>"; }; | 470 | BF3E4A741E2F30B700D90659 /* 上传封面.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "上传封面.png"; sourceTree = "<group>"; }; |
@@ -1234,6 +1236,7 @@ | @@ -1234,6 +1236,7 @@ | ||
1234 | children = ( | 1236 | children = ( |
1235 | BFBB83DD1ECC445D008B404B /* LoginViewController.swift */, | 1237 | BFBB83DD1ECC445D008B404B /* LoginViewController.swift */, |
1236 | BFBB83E01ECC445D008B404B /* RegisterViewController.swift */, | 1238 | BFBB83E01ECC445D008B404B /* RegisterViewController.swift */, |
1239 | + BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */, | ||
1237 | BFBB83E11ECC445D008B404B /* Login.storyboard */, | 1240 | BFBB83E11ECC445D008B404B /* Login.storyboard */, |
1238 | ); | 1241 | ); |
1239 | path = UserCenter; | 1242 | path = UserCenter; |
@@ -1557,6 +1560,7 @@ | @@ -1557,6 +1560,7 @@ | ||
1557 | BF7B759C1E305A6D0011D5C7 /* MJRefreshAutoNormalFooter.m in Sources */, | 1560 | BF7B759C1E305A6D0011D5C7 /* MJRefreshAutoNormalFooter.m in Sources */, |
1558 | 5904FC4F1ECA8B8C00E631FF /* SearchTVStationListViewController.swift in Sources */, | 1561 | 5904FC4F1ECA8B8C00E631FF /* SearchTVStationListViewController.swift in Sources */, |
1559 | BFC076781E3445F3008BAC79 /* DownLoad.swift in Sources */, | 1562 | BFC076781E3445F3008BAC79 /* DownLoad.swift in Sources */, |
1563 | + BF29F9081ED6ACC2004667AF /* NewLoginViewController.swift in Sources */, | ||
1560 | 59AE3DFF1ECFDAFD003E2C62 /* TVStationChannelViewController.swift in Sources */, | 1564 | 59AE3DFF1ECFDAFD003E2C62 /* TVStationChannelViewController.swift in Sources */, |
1561 | BF25DFE71DDAA36A003EC0C1 /* MultipartFormData.swift in Sources */, | 1565 | BF25DFE71DDAA36A003EC0C1 /* MultipartFormData.swift in Sources */, |
1562 | 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */, | 1566 | 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */, |
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/Contents.json
0 → 100644
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/3.png
0 → 100644
3.96 KB
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/Contents.json
0 → 100644
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "idiom" : "universal", | ||
5 | + "scale" : "1x" | ||
6 | + }, | ||
7 | + { | ||
8 | + "idiom" : "universal", | ||
9 | + "filename" : "3.png", | ||
10 | + "scale" : "2x" | ||
11 | + }, | ||
12 | + { | ||
13 | + "idiom" : "universal", | ||
14 | + "scale" : "3x" | ||
15 | + } | ||
16 | + ], | ||
17 | + "info" : { | ||
18 | + "version" : 1, | ||
19 | + "author" : "xcode" | ||
20 | + } | ||
21 | +} | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/2.png
0 → 100644
3.82 KB
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/Contents.json
0 → 100644
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "idiom" : "universal", | ||
5 | + "scale" : "1x" | ||
6 | + }, | ||
7 | + { | ||
8 | + "idiom" : "universal", | ||
9 | + "filename" : "2.png", | ||
10 | + "scale" : "2x" | ||
11 | + }, | ||
12 | + { | ||
13 | + "idiom" : "universal", | ||
14 | + "scale" : "3x" | ||
15 | + } | ||
16 | + ], | ||
17 | + "info" : { | ||
18 | + "version" : 1, | ||
19 | + "author" : "xcode" | ||
20 | + } | ||
21 | +} | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |
YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="fhe-aI-EYq"> | 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="fhe-aI-EYq"> | ||
3 | <device id="retina4_7" orientation="portrait"> | 3 | <device id="retina4_7" orientation="portrait"> |
4 | <adaptation id="fullscreen"/> | 4 | <adaptation id="fullscreen"/> |
5 | </device> | 5 | </device> |
@@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
81 | <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> | 81 | <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> |
82 | <autoresizingMask key="autoresizingMask"/> | 82 | <autoresizingMask key="autoresizingMask"/> |
83 | <subviews> | 83 | <subviews> |
84 | - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> | 84 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> |
85 | <rect key="frame" x="8" y="25" width="90" height="90"/> | 85 | <rect key="frame" x="8" y="25" width="90" height="90"/> |
86 | <constraints> | 86 | <constraints> |
87 | <constraint firstAttribute="width" constant="90" id="1QK-QU-Ukp"/> | 87 | <constraint firstAttribute="width" constant="90" id="1QK-QU-Ukp"/> |
@@ -423,7 +423,7 @@ | @@ -423,7 +423,7 @@ | ||
423 | <rect key="frame" x="0.0" y="0.0" width="207" height="193"/> | 423 | <rect key="frame" x="0.0" y="0.0" width="207" height="193"/> |
424 | <autoresizingMask key="autoresizingMask"/> | 424 | <autoresizingMask key="autoresizingMask"/> |
425 | <subviews> | 425 | <subviews> |
426 | - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="5g9-CD-vXa"> | 426 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="5g9-CD-vXa"> |
427 | <rect key="frame" x="0.0" y="0.0" width="207" height="93.5"/> | 427 | <rect key="frame" x="0.0" y="0.0" width="207" height="93.5"/> |
428 | <userDefinedRuntimeAttributes> | 428 | <userDefinedRuntimeAttributes> |
429 | <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | 429 | <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> |
@@ -569,7 +569,7 @@ | @@ -569,7 +569,7 @@ | ||
569 | <rect key="frame" x="0.0" y="0.0" width="147" height="246"/> | 569 | <rect key="frame" x="0.0" y="0.0" width="147" height="246"/> |
570 | <autoresizingMask key="autoresizingMask"/> | 570 | <autoresizingMask key="autoresizingMask"/> |
571 | <subviews> | 571 | <subviews> |
572 | - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="bUk-R1-5gT"> | 572 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="bUk-R1-5gT"> |
573 | <rect key="frame" x="0.0" y="0.0" width="147" height="147"/> | 573 | <rect key="frame" x="0.0" y="0.0" width="147" height="147"/> |
574 | <constraints> | 574 | <constraints> |
575 | <constraint firstAttribute="width" secondItem="bUk-R1-5gT" secondAttribute="height" multiplier="1:1" id="MTe-oF-wJF"/> | 575 | <constraint firstAttribute="width" secondItem="bUk-R1-5gT" secondAttribute="height" multiplier="1:1" id="MTe-oF-wJF"/> |
@@ -736,7 +736,7 @@ | @@ -736,7 +736,7 @@ | ||
736 | <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> | 736 | <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> |
737 | <nil key="highlightedColor"/> | 737 | <nil key="highlightedColor"/> |
738 | </label> | 738 | </label> |
739 | - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> | 739 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> |
740 | <rect key="frame" x="0.0" y="0.0" width="128" height="128"/> | 740 | <rect key="frame" x="0.0" y="0.0" width="128" height="128"/> |
741 | <constraints> | 741 | <constraints> |
742 | <constraint firstAttribute="width" secondItem="ZWf-Th-UTw" secondAttribute="height" multiplier="1:1" id="u0O-8v-OqH"/> | 742 | <constraint firstAttribute="width" secondItem="ZWf-Th-UTw" secondAttribute="height" multiplier="1:1" id="u0O-8v-OqH"/> |
@@ -799,24 +799,6 @@ | @@ -799,24 +799,6 @@ | ||
799 | </objects> | 799 | </objects> |
800 | <point key="canvasLocation" x="-1839.2" y="2112.5937031484259"/> | 800 | <point key="canvasLocation" x="-1839.2" y="2112.5937031484259"/> |
801 | </scene> | 801 | </scene> |
802 | - <!--New Login View Controller--> | ||
803 | - <scene sceneID="6BI-o5-Qja"> | ||
804 | - <objects> | ||
805 | - <viewController storyboardIdentifier="NewLoginViewController" id="QvS-Na-sKF" customClass="NewLoginViewController" sceneMemberID="viewController"> | ||
806 | - <layoutGuides> | ||
807 | - <viewControllerLayoutGuide type="top" id="czg-Be-gUk"/> | ||
808 | - <viewControllerLayoutGuide type="bottom" id="EYT-SF-CDG"/> | ||
809 | - </layoutGuides> | ||
810 | - <view key="view" contentMode="scaleToFill" id="JVV-Bc-g56"> | ||
811 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
812 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
813 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
814 | - </view> | ||
815 | - </viewController> | ||
816 | - <placeholder placeholderIdentifier="IBFirstResponder" id="7Vp-aM-FMN" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
817 | - </objects> | ||
818 | - <point key="canvasLocation" x="-904.79999999999995" y="2794.4527736131936"/> | ||
819 | - </scene> | ||
820 | <!--用户--> | 802 | <!--用户--> |
821 | <scene sceneID="8Ie-AH-DJ4"> | 803 | <scene sceneID="8Ie-AH-DJ4"> |
822 | <objects> | 804 | <objects> |
@@ -1489,7 +1471,7 @@ | @@ -1489,7 +1471,7 @@ | ||
1489 | <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> | 1471 | <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> |
1490 | <autoresizingMask key="autoresizingMask"/> | 1472 | <autoresizingMask key="autoresizingMask"/> |
1491 | <subviews> | 1473 | <subviews> |
1492 | - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> | 1474 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> |
1493 | <rect key="frame" x="8" y="24" width="90" height="90"/> | 1475 | <rect key="frame" x="8" y="24" width="90" height="90"/> |
1494 | <constraints> | 1476 | <constraints> |
1495 | <constraint firstAttribute="width" secondItem="qia-pR-e6p" secondAttribute="height" multiplier="1:1" id="6Zi-MO-Pqe"/> | 1477 | <constraint firstAttribute="width" secondItem="qia-pR-e6p" secondAttribute="height" multiplier="1:1" id="6Zi-MO-Pqe"/> |
YouerLiveVideo/YouerLiveVideo/controllers/LeadViewController.swift
@@ -13,11 +13,12 @@ class LeadViewController: UIViewController { | @@ -13,11 +13,12 @@ class LeadViewController: UIViewController { | ||
13 | override func viewDidLoad() { | 13 | override func viewDidLoad() { |
14 | super.viewDidLoad() | 14 | super.viewDidLoad() |
15 | LeadViewController.instance=self | 15 | LeadViewController.instance=self |
16 | - if AppDelegate.instance().accountManager.isOnline() { | ||
17 | - showMain() | ||
18 | - }else{ | ||
19 | - showLogin() | ||
20 | - } | 16 | + showMain() |
17 | +// if AppDelegate.instance().accountManager.isOnline() { | ||
18 | +// showMain() | ||
19 | +// }else{ | ||
20 | +// showLogin() | ||
21 | +// } | ||
21 | } | 22 | } |
22 | func showMain() { | 23 | func showMain() { |
23 | removeAll() | 24 | removeAll() |
@@ -26,7 +27,7 @@ class LeadViewController: UIViewController { | @@ -26,7 +27,7 @@ class LeadViewController: UIViewController { | ||
26 | } | 27 | } |
27 | func showLogin() { | 28 | func showLogin() { |
28 | removeAll() | 29 | removeAll() |
29 | - let vc=Story.instantiateViewControllerWithIdentifier("LoginViewControllerVC", storyName: "Login") as! LoginViewController | 30 | + let vc=Story.instantiateViewControllerWithIdentifier("NewLoginViewControllerVC", storyName: "Login") as! NewLoginViewController |
30 | displayContentController(content: vc) | 31 | displayContentController(content: vc) |
31 | } | 32 | } |
32 | override func didReceiveMemoryWarning() { | 33 | override func didReceiveMemoryWarning() { |
YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift
@@ -49,6 +49,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView | @@ -49,6 +49,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView | ||
49 | for item in JSON.fromString(jsonString: str)!["data"].arrayValue { | 49 | for item in JSON.fromString(jsonString: str)!["data"].arrayValue { |
50 | self.dataSet.append(filterListModel(j: item)) | 50 | self.dataSet.append(filterListModel(j: item)) |
51 | } | 51 | } |
52 | + self.currentItem=filterListModel(array: self.dataSet) | ||
53 | + self.tableView.reloadData() | ||
52 | }, failHandler: { (error) in | 54 | }, failHandler: { (error) in |
53 | self.view.makeToast("获取知识点目录失败:\(error.localizedDescription)") | 55 | self.view.makeToast("获取知识点目录失败:\(error.localizedDescription)") |
54 | }) | 56 | }) |
@@ -67,6 +69,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView | @@ -67,6 +69,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView | ||
67 | for item in JSON.fromString(jsonString: str)!["data"].arrayValue { | 69 | for item in JSON.fromString(jsonString: str)!["data"].arrayValue { |
68 | self.dataSet.append(filterListModel(j: item)) | 70 | self.dataSet.append(filterListModel(j: item)) |
69 | } | 71 | } |
72 | + self.currentItem=filterListModel(array: self.dataSet) | ||
73 | + self.tableView.reloadData() | ||
70 | }, failHandler: { (error) in | 74 | }, failHandler: { (error) in |
71 | self.view.makeToast("获取考点目录失败:\(error.localizedDescription)") | 75 | self.view.makeToast("获取考点目录失败:\(error.localizedDescription)") |
72 | }) | 76 | }) |
YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift
@@ -36,6 +36,7 @@ class ChangePassWordViewController: UIViewController { | @@ -36,6 +36,7 @@ class ChangePassWordViewController: UIViewController { | ||
36 | override func viewDidLoad() { | 36 | override func viewDidLoad() { |
37 | super.viewDidLoad() | 37 | super.viewDidLoad() |
38 | if user.isOnline() { | 38 | if user.isOnline() { |
39 | + self.title="密码修改" | ||
39 | self.navigationItem.rightBarButtonItem=nil | 40 | self.navigationItem.rightBarButtonItem=nil |
40 | phonrView.isHidden=true | 41 | phonrView.isHidden=true |
41 | phoneViewHeight.constant=0 | 42 | phoneViewHeight.constant=0 |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard
@@ -69,16 +69,19 @@ | @@ -69,16 +69,19 @@ | ||
69 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | 69 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
70 | <nil key="highlightedColor"/> | 70 | <nil key="highlightedColor"/> |
71 | </label> | 71 | </label> |
72 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="userId.png" translatesAutoresizingMaskIntoConstraints="NO" id="1xZ-bM-AMz"> | ||
73 | - <rect key="frame" x="8" y="12.5" width="20" height="31"/> | 72 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_account" translatesAutoresizingMaskIntoConstraints="NO" id="1xZ-bM-AMz"> |
73 | + <rect key="frame" x="0.0" y="0.5" width="44" height="55"/> | ||
74 | <constraints> | 74 | <constraints> |
75 | - <constraint firstAttribute="width" constant="20" id="3hd-Sx-hPC"/> | ||
76 | - <constraint firstAttribute="width" secondItem="1xZ-bM-AMz" secondAttribute="height" multiplier="9:14" id="DCg-L0-4Lx"/> | 75 | + <constraint firstAttribute="width" constant="44" id="3hd-Sx-hPC"/> |
76 | + <constraint firstAttribute="width" secondItem="1xZ-bM-AMz" secondAttribute="height" multiplier="44:55" id="DCg-L0-4Lx"/> | ||
77 | </constraints> | 77 | </constraints> |
78 | </imageView> | 78 | </imageView> |
79 | <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入账号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="IzH-dB-I9H"> | 79 | <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入账号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="IzH-dB-I9H"> |
80 | - <rect key="frame" x="36" y="18.5" width="339" height="19"/> | ||
81 | - <fontDescription key="fontDescription" type="system" pointSize="15"/> | 80 | + <rect key="frame" x="52" y="10.5" width="323" height="35"/> |
81 | + <constraints> | ||
82 | + <constraint firstAttribute="height" constant="35" id="adv-Na-JHi"/> | ||
83 | + </constraints> | ||
84 | + <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
82 | <textInputTraits key="textInputTraits" keyboardType="numberPad"/> | 85 | <textInputTraits key="textInputTraits" keyboardType="numberPad"/> |
83 | <connections> | 86 | <connections> |
84 | <outlet property="delegate" destination="fvc-9c-Gca" id="l7n-F4-FsF"/> | 87 | <outlet property="delegate" destination="fvc-9c-Gca" id="l7n-F4-FsF"/> |
@@ -91,7 +94,7 @@ | @@ -91,7 +94,7 @@ | ||
91 | <constraint firstAttribute="height" constant="56" id="Ff7-2n-071"/> | 94 | <constraint firstAttribute="height" constant="56" id="Ff7-2n-071"/> |
92 | <constraint firstItem="IzH-dB-I9H" firstAttribute="leading" secondItem="1xZ-bM-AMz" secondAttribute="trailing" constant="8" id="Mi3-ud-m0O"/> | 95 | <constraint firstItem="IzH-dB-I9H" firstAttribute="leading" secondItem="1xZ-bM-AMz" secondAttribute="trailing" constant="8" id="Mi3-ud-m0O"/> |
93 | <constraint firstItem="IzH-dB-I9H" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="Ud1-tF-ivz"/> | 96 | <constraint firstItem="IzH-dB-I9H" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="Ud1-tF-ivz"/> |
94 | - <constraint firstItem="1xZ-bM-AMz" firstAttribute="leading" secondItem="EAC-sg-BLE" secondAttribute="leading" constant="8" id="Z77-MJ-BF0"/> | 97 | + <constraint firstItem="1xZ-bM-AMz" firstAttribute="leading" secondItem="EAC-sg-BLE" secondAttribute="leading" id="Z77-MJ-BF0"/> |
95 | <constraint firstAttribute="bottom" secondItem="NJW-yg-XQM" secondAttribute="bottom" id="i3N-yW-fre"/> | 98 | <constraint firstAttribute="bottom" secondItem="NJW-yg-XQM" secondAttribute="bottom" id="i3N-yW-fre"/> |
96 | <constraint firstAttribute="trailing" secondItem="NJW-yg-XQM" secondAttribute="trailing" constant="8" id="ued-ca-1l3"/> | 99 | <constraint firstAttribute="trailing" secondItem="NJW-yg-XQM" secondAttribute="trailing" constant="8" id="ued-ca-1l3"/> |
97 | <constraint firstItem="1xZ-bM-AMz" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="xd6-hf-JPu"/> | 100 | <constraint firstItem="1xZ-bM-AMz" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="xd6-hf-JPu"/> |
@@ -111,16 +114,19 @@ | @@ -111,16 +114,19 @@ | ||
111 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | 114 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
112 | <nil key="highlightedColor"/> | 115 | <nil key="highlightedColor"/> |
113 | </label> | 116 | </label> |
114 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="userPassword.png" translatesAutoresizingMaskIntoConstraints="NO" id="oON-zY-4HS"> | ||
115 | - <rect key="frame" x="8" y="15" width="20" height="26"/> | 117 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_password" translatesAutoresizingMaskIntoConstraints="NO" id="oON-zY-4HS"> |
118 | + <rect key="frame" x="0.0" y="0.5" width="44" height="55"/> | ||
116 | <constraints> | 119 | <constraints> |
117 | - <constraint firstAttribute="width" secondItem="oON-zY-4HS" secondAttribute="height" multiplier="31:41" id="hSc-3U-3kl"/> | ||
118 | - <constraint firstAttribute="width" constant="20" id="vb3-Wd-N14"/> | 120 | + <constraint firstAttribute="width" secondItem="oON-zY-4HS" secondAttribute="height" multiplier="44:55" id="hSc-3U-3kl"/> |
121 | + <constraint firstAttribute="width" constant="44" id="vb3-Wd-N14"/> | ||
119 | </constraints> | 122 | </constraints> |
120 | </imageView> | 123 | </imageView> |
121 | <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="nVn-EA-yWM"> | 124 | <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="nVn-EA-yWM"> |
122 | - <rect key="frame" x="36" y="18.5" width="339" height="19"/> | ||
123 | - <fontDescription key="fontDescription" type="system" pointSize="15"/> | 125 | + <rect key="frame" x="52" y="10.5" width="323" height="35"/> |
126 | + <constraints> | ||
127 | + <constraint firstAttribute="height" constant="35" id="TLP-I4-ADu"/> | ||
128 | + </constraints> | ||
129 | + <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
124 | <textInputTraits key="textInputTraits" secureTextEntry="YES"/> | 130 | <textInputTraits key="textInputTraits" secureTextEntry="YES"/> |
125 | <connections> | 131 | <connections> |
126 | <outlet property="delegate" destination="fvc-9c-Gca" id="tMS-9N-o09"/> | 132 | <outlet property="delegate" destination="fvc-9c-Gca" id="tMS-9N-o09"/> |
@@ -129,7 +135,7 @@ | @@ -129,7 +135,7 @@ | ||
129 | </subviews> | 135 | </subviews> |
130 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 136 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
131 | <constraints> | 137 | <constraints> |
132 | - <constraint firstItem="oON-zY-4HS" firstAttribute="leading" secondItem="xba-Rv-jIe" secondAttribute="leading" constant="8" id="6sV-zB-qIs"/> | 138 | + <constraint firstItem="oON-zY-4HS" firstAttribute="leading" secondItem="xba-Rv-jIe" secondAttribute="leading" id="6sV-zB-qIs"/> |
133 | <constraint firstItem="nVn-EA-yWM" firstAttribute="centerY" secondItem="xba-Rv-jIe" secondAttribute="centerY" id="HaD-wa-ZFb"/> | 139 | <constraint firstItem="nVn-EA-yWM" firstAttribute="centerY" secondItem="xba-Rv-jIe" secondAttribute="centerY" id="HaD-wa-ZFb"/> |
134 | <constraint firstAttribute="trailing" secondItem="BcZ-u5-RFA" secondAttribute="trailing" id="KDU-ei-Izn"/> | 140 | <constraint firstAttribute="trailing" secondItem="BcZ-u5-RFA" secondAttribute="trailing" id="KDU-ei-Izn"/> |
135 | <constraint firstItem="nVn-EA-yWM" firstAttribute="leading" secondItem="oON-zY-4HS" secondAttribute="trailing" constant="8" id="LHP-bs-Kee"/> | 141 | <constraint firstItem="nVn-EA-yWM" firstAttribute="leading" secondItem="oON-zY-4HS" secondAttribute="trailing" constant="8" id="LHP-bs-Kee"/> |
@@ -175,8 +181,8 @@ | @@ -175,8 +181,8 @@ | ||
175 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pzO-1N-Vrz"> | 181 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pzO-1N-Vrz"> |
176 | <rect key="frame" x="16" y="182" width="343" height="30"/> | 182 | <rect key="frame" x="16" y="182" width="343" height="30"/> |
177 | <subviews> | 183 | <subviews> |
178 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="忘记密码或找回密码" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6n-Br-sBy"> | ||
179 | - <rect key="frame" x="0.0" y="0.0" width="119.5" height="30"/> | 184 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="忘记密码" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6n-Br-sBy"> |
185 | + <rect key="frame" x="0.0" y="0.0" width="53.5" height="30"/> | ||
180 | <fontDescription key="fontDescription" type="system" pointSize="13"/> | 186 | <fontDescription key="fontDescription" type="system" pointSize="13"/> |
181 | <nil key="highlightedColor"/> | 187 | <nil key="highlightedColor"/> |
182 | </label> | 188 | </label> |
@@ -250,14 +256,14 @@ | @@ -250,14 +256,14 @@ | ||
250 | <constraint firstItem="eXd-TY-qlW" firstAttribute="top" secondItem="tqb-X5-ujR" secondAttribute="top" id="uPt-SF-Tbq"/> | 256 | <constraint firstItem="eXd-TY-qlW" firstAttribute="top" secondItem="tqb-X5-ujR" secondAttribute="top" id="uPt-SF-Tbq"/> |
251 | </constraints> | 257 | </constraints> |
252 | </view> | 258 | </view> |
253 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="w9T-jY-F3e"> | 259 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="w9T-jY-F3e"> |
254 | <rect key="frame" x="0.0" y="520" width="375" height="147"/> | 260 | <rect key="frame" x="0.0" y="520" width="375" height="147"/> |
255 | <constraints> | 261 | <constraints> |
256 | <constraint firstAttribute="width" secondItem="w9T-jY-F3e" secondAttribute="height" multiplier="636:249" id="HLo-XG-7PS"/> | 262 | <constraint firstAttribute="width" secondItem="w9T-jY-F3e" secondAttribute="height" multiplier="636:249" id="HLo-XG-7PS"/> |
257 | </constraints> | 263 | </constraints> |
258 | </imageView> | 264 | </imageView> |
259 | </subviews> | 265 | </subviews> |
260 | - <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | 266 | + <color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="calibratedRGB"/> |
261 | <gestureRecognizers/> | 267 | <gestureRecognizers/> |
262 | <constraints> | 268 | <constraints> |
263 | <constraint firstAttribute="trailing" secondItem="rfv-aY-7Su" secondAttribute="trailing" id="2JQ-xt-IcS"/> | 269 | <constraint firstAttribute="trailing" secondItem="rfv-aY-7Su" secondAttribute="trailing" id="2JQ-xt-IcS"/> |
@@ -585,12 +591,12 @@ | @@ -585,12 +591,12 @@ | ||
585 | <constraint firstAttribute="width" constant="93" id="tn3-0t-fnt"/> | 591 | <constraint firstAttribute="width" constant="93" id="tn3-0t-fnt"/> |
586 | </constraints> | 592 | </constraints> |
587 | <fontDescription key="fontDescription" type="system" pointSize="15"/> | 593 | <fontDescription key="fontDescription" type="system" pointSize="15"/> |
588 | - <state key="normal" title=" 发送验证码 "> | 594 | + <state key="normal" title="获取验证码"> |
589 | <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | 595 | <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
590 | </state> | 596 | </state> |
591 | <userDefinedRuntimeAttributes> | 597 | <userDefinedRuntimeAttributes> |
592 | <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | 598 | <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
593 | - <integer key="value" value="15"/> | 599 | + <integer key="value" value="5"/> |
594 | </userDefinedRuntimeAttribute> | 600 | </userDefinedRuntimeAttribute> |
595 | <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | 601 | <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> |
596 | </userDefinedRuntimeAttributes> | 602 | </userDefinedRuntimeAttributes> |
@@ -673,7 +679,7 @@ | @@ -673,7 +679,7 @@ | ||
673 | </view> | 679 | </view> |
674 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R1Y-16-Th7"> | 680 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R1Y-16-Th7"> |
675 | <rect key="frame" x="62.5" y="444" width="250" height="40"/> | 681 | <rect key="frame" x="62.5" y="444" width="250" height="40"/> |
676 | - <color key="backgroundColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> | 682 | + <color key="backgroundColor" red="0.10980392156862745" green="0.63529411764705879" blue="1" alpha="1" colorSpace="calibratedRGB"/> |
677 | <constraints> | 683 | <constraints> |
678 | <constraint firstAttribute="height" constant="40" id="Kvn-w3-Juc"/> | 684 | <constraint firstAttribute="height" constant="40" id="Kvn-w3-Juc"/> |
679 | </constraints> | 685 | </constraints> |
@@ -782,12 +788,251 @@ | @@ -782,12 +788,251 @@ | ||
782 | </objects> | 788 | </objects> |
783 | <point key="canvasLocation" x="-2162.4000000000001" y="1533.2833583208396"/> | 789 | <point key="canvasLocation" x="-2162.4000000000001" y="1533.2833583208396"/> |
784 | </scene> | 790 | </scene> |
791 | + <!--New Login View Controller--> | ||
792 | + <scene sceneID="j0h-zV-7K8"> | ||
793 | + <objects> | ||
794 | + <viewController storyboardIdentifier="NewLoginViewControllerVC" id="7YD-gA-dLJ" customClass="NewLoginViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
795 | + <layoutGuides> | ||
796 | + <viewControllerLayoutGuide type="top" id="Hx8-x7-gQe"/> | ||
797 | + <viewControllerLayoutGuide type="bottom" id="eS2-l5-mzB"/> | ||
798 | + </layoutGuides> | ||
799 | + <view key="view" contentMode="scaleToFill" id="U95-dB-O8D"> | ||
800 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
801 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
802 | + <subviews> | ||
803 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="zyE-vu-SeI"> | ||
804 | + <rect key="frame" x="0.0" y="543" width="375" height="124"/> | ||
805 | + </imageView> | ||
806 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eHe-yf-D8O"> | ||
807 | + <rect key="frame" x="0.0" y="89" width="375" height="450"/> | ||
808 | + <subviews> | ||
809 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qaQ-kA-93Q"> | ||
810 | + <rect key="frame" x="0.0" y="0.0" width="375" height="150"/> | ||
811 | + <subviews> | ||
812 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="教育视频云" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ec7-mI-K9h"> | ||
813 | + <rect key="frame" x="150" y="0.0" width="225" height="150"/> | ||
814 | + <fontDescription key="fontDescription" type="system" pointSize="20"/> | ||
815 | + <color key="textColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
816 | + <nil key="highlightedColor"/> | ||
817 | + </label> | ||
818 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="gDj-kE-hGr"> | ||
819 | + <rect key="frame" x="82" y="45" width="60" height="60"/> | ||
820 | + <constraints> | ||
821 | + <constraint firstAttribute="width" constant="60" id="PKK-Q1-8Jn"/> | ||
822 | + <constraint firstAttribute="width" secondItem="gDj-kE-hGr" secondAttribute="height" multiplier="1:1" id="xKA-m4-vuJ"/> | ||
823 | + </constraints> | ||
824 | + </imageView> | ||
825 | + </subviews> | ||
826 | + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
827 | + <constraints> | ||
828 | + <constraint firstItem="gDj-kE-hGr" firstAttribute="centerY" secondItem="qaQ-kA-93Q" secondAttribute="centerY" id="8ha-Wn-OjW"/> | ||
829 | + <constraint firstItem="ec7-mI-K9h" firstAttribute="width" secondItem="qaQ-kA-93Q" secondAttribute="width" multiplier="3:5" id="9uF-4e-KSo"/> | ||
830 | + <constraint firstItem="ec7-mI-K9h" firstAttribute="top" secondItem="qaQ-kA-93Q" secondAttribute="top" id="WPI-Og-MpZ"/> | ||
831 | + <constraint firstAttribute="trailing" secondItem="ec7-mI-K9h" secondAttribute="trailing" id="bw9-GP-aMX"/> | ||
832 | + <constraint firstAttribute="bottom" secondItem="ec7-mI-K9h" secondAttribute="bottom" id="rbZ-zR-cZY"/> | ||
833 | + <constraint firstItem="ec7-mI-K9h" firstAttribute="leading" secondItem="gDj-kE-hGr" secondAttribute="trailing" constant="8" id="t1g-EG-T2Y"/> | ||
834 | + </constraints> | ||
835 | + </view> | ||
836 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="45M-7w-dCo"> | ||
837 | + <rect key="frame" x="0.0" y="150" width="375" height="150"/> | ||
838 | + <subviews> | ||
839 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gJJ-nb-LuW"> | ||
840 | + <rect key="frame" x="0.0" y="19" width="375" height="112"/> | ||
841 | + <subviews> | ||
842 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OEu-Xn-tgO"> | ||
843 | + <rect key="frame" x="0.0" y="111" width="375" height="1"/> | ||
844 | + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
845 | + <constraints> | ||
846 | + <constraint firstAttribute="height" constant="1" id="ebn-7Z-Vd9"/> | ||
847 | + </constraints> | ||
848 | + </view> | ||
849 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4JH-HW-GWr"> | ||
850 | + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/> | ||
851 | + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
852 | + <constraints> | ||
853 | + <constraint firstAttribute="height" constant="1" id="1IP-S2-tPz"/> | ||
854 | + </constraints> | ||
855 | + </view> | ||
856 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yg0-D7-3oz"> | ||
857 | + <rect key="frame" x="14" y="56" width="347" height="1"/> | ||
858 | + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
859 | + <constraints> | ||
860 | + <constraint firstAttribute="height" constant="1" id="VHq-6D-TO2"/> | ||
861 | + </constraints> | ||
862 | + </view> | ||
863 | + <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_password" translatesAutoresizingMaskIntoConstraints="NO" id="kqI-fA-5MC"> | ||
864 | + <rect key="frame" x="14" y="57" width="44" height="55"/> | ||
865 | + <constraints> | ||
866 | + <constraint firstAttribute="width" constant="44" id="X18-oH-BbC"/> | ||
867 | + </constraints> | ||
868 | + </imageView> | ||
869 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入账号" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="U1G-S8-74U"> | ||
870 | + <rect key="frame" x="66" y="11" width="295" height="35"/> | ||
871 | + <color key="tintColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
872 | + <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
873 | + <textInputTraits key="textInputTraits" returnKeyType="done"/> | ||
874 | + <connections> | ||
875 | + <action selector="didAccountEnd:" destination="7YD-gA-dLJ" eventType="editingDidEndOnExit" id="u0t-LN-P5O"/> | ||
876 | + <outlet property="delegate" destination="7YD-gA-dLJ" id="G57-JW-uTJ"/> | ||
877 | + </connections> | ||
878 | + </textField> | ||
879 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="bnT-lO-cJS"> | ||
880 | + <rect key="frame" x="66" y="67" width="295" height="34"/> | ||
881 | + <color key="tintColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
882 | + <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
883 | + <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/> | ||
884 | + <connections> | ||
885 | + <action selector="didPWEnd:" destination="7YD-gA-dLJ" eventType="editingDidEndOnExit" id="HdW-oQ-I2Q"/> | ||
886 | + </connections> | ||
887 | + </textField> | ||
888 | + <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_account" translatesAutoresizingMaskIntoConstraints="NO" id="XBn-W6-2qi"> | ||
889 | + <rect key="frame" x="14" y="1" width="44" height="55"/> | ||
890 | + <constraints> | ||
891 | + <constraint firstAttribute="width" constant="44" id="uiy-yL-5eG"/> | ||
892 | + </constraints> | ||
893 | + </imageView> | ||
894 | + </subviews> | ||
895 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
896 | + <constraints> | ||
897 | + <constraint firstItem="yg0-D7-3oz" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="15o-2i-SFf"/> | ||
898 | + <constraint firstAttribute="trailing" secondItem="4JH-HW-GWr" secondAttribute="trailing" id="8h5-Qs-Xoi"/> | ||
899 | + <constraint firstAttribute="height" constant="112" id="Hm8-Wj-pgl"/> | ||
900 | + <constraint firstItem="kqI-fA-5MC" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="Ixl-pb-lLo"/> | ||
901 | + <constraint firstAttribute="trailing" secondItem="yg0-D7-3oz" secondAttribute="trailing" constant="14" id="J5P-56-niN"/> | ||
902 | + <constraint firstItem="bnT-lO-cJS" firstAttribute="top" secondItem="yg0-D7-3oz" secondAttribute="bottom" constant="10" id="JBC-8p-tuV"/> | ||
903 | + <constraint firstItem="kqI-fA-5MC" firstAttribute="top" secondItem="XBn-W6-2qi" secondAttribute="bottom" constant="1" id="Jcj-qa-cIi"/> | ||
904 | + <constraint firstItem="yg0-D7-3oz" firstAttribute="top" secondItem="XBn-W6-2qi" secondAttribute="bottom" id="Mdb-ch-ZlW"/> | ||
905 | + <constraint firstAttribute="centerY" secondItem="yg0-D7-3oz" secondAttribute="centerY" id="MnZ-i3-lie"/> | ||
906 | + <constraint firstItem="OEu-Xn-tgO" firstAttribute="top" secondItem="bnT-lO-cJS" secondAttribute="bottom" constant="10" id="Szn-55-hl8"/> | ||
907 | + <constraint firstItem="bnT-lO-cJS" firstAttribute="leading" secondItem="kqI-fA-5MC" secondAttribute="trailing" constant="8" id="TNM-xX-JWf"/> | ||
908 | + <constraint firstAttribute="trailing" secondItem="OEu-Xn-tgO" secondAttribute="trailing" id="TnQ-QR-ZqC"/> | ||
909 | + <constraint firstItem="4JH-HW-GWr" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" id="bad-nK-MJN"/> | ||
910 | + <constraint firstItem="U1G-S8-74U" firstAttribute="top" secondItem="4JH-HW-GWr" secondAttribute="bottom" constant="10" id="dff-gC-kKN"/> | ||
911 | + <constraint firstItem="U1G-S8-74U" firstAttribute="leading" secondItem="XBn-W6-2qi" secondAttribute="trailing" constant="8" id="eUd-No-Eg0"/> | ||
912 | + <constraint firstAttribute="trailing" secondItem="U1G-S8-74U" secondAttribute="trailing" constant="14" id="h83-Z3-hRA"/> | ||
913 | + <constraint firstItem="XBn-W6-2qi" firstAttribute="top" secondItem="4JH-HW-GWr" secondAttribute="bottom" id="hLE-0b-pLh"/> | ||
914 | + <constraint firstItem="XBn-W6-2qi" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="nS7-If-baY"/> | ||
915 | + <constraint firstAttribute="bottom" secondItem="OEu-Xn-tgO" secondAttribute="bottom" id="pPd-Gj-W6j"/> | ||
916 | + <constraint firstAttribute="trailing" secondItem="bnT-lO-cJS" secondAttribute="trailing" constant="14" id="r6Q-pS-fBv"/> | ||
917 | + <constraint firstItem="4JH-HW-GWr" firstAttribute="top" secondItem="gJJ-nb-LuW" secondAttribute="top" id="rCd-rS-bF0"/> | ||
918 | + <constraint firstAttribute="bottom" secondItem="kqI-fA-5MC" secondAttribute="bottom" id="riy-n9-KgD"/> | ||
919 | + <constraint firstItem="yg0-D7-3oz" firstAttribute="top" secondItem="U1G-S8-74U" secondAttribute="bottom" constant="10" id="xb9-Q9-Gvv"/> | ||
920 | + <constraint firstItem="OEu-Xn-tgO" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" id="xd7-f5-dzp"/> | ||
921 | + </constraints> | ||
922 | + </view> | ||
923 | + </subviews> | ||
924 | + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
925 | + <constraints> | ||
926 | + <constraint firstAttribute="trailing" secondItem="gJJ-nb-LuW" secondAttribute="trailing" id="39D-4u-t3c"/> | ||
927 | + <constraint firstAttribute="centerY" secondItem="gJJ-nb-LuW" secondAttribute="centerY" id="IvL-uw-yYb"/> | ||
928 | + <constraint firstItem="gJJ-nb-LuW" firstAttribute="leading" secondItem="45M-7w-dCo" secondAttribute="leading" id="MEk-fk-31f"/> | ||
929 | + </constraints> | ||
930 | + </view> | ||
931 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZS7-D8-cI3"> | ||
932 | + <rect key="frame" x="0.0" y="300" width="375" height="150"/> | ||
933 | + <subviews> | ||
934 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d0Y-Gl-m8Z"> | ||
935 | + <rect key="frame" x="18" y="8" width="339" height="44"/> | ||
936 | + <color key="backgroundColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
937 | + <constraints> | ||
938 | + <constraint firstAttribute="height" constant="44" id="QxF-DH-QwA"/> | ||
939 | + </constraints> | ||
940 | + <fontDescription key="fontDescription" type="system" pointSize="18"/> | ||
941 | + <state key="normal" title="登录"> | ||
942 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
943 | + <color key="titleShadowColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
944 | + </state> | ||
945 | + <connections> | ||
946 | + <action selector="onLoginClicked:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="oVG-0D-j2T"/> | ||
947 | + </connections> | ||
948 | + </button> | ||
949 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Oee-Sm-GxU"> | ||
950 | + <rect key="frame" x="18" y="68" width="60" height="21"/> | ||
951 | + <constraints> | ||
952 | + <constraint firstAttribute="height" constant="21" id="C3O-IB-eG6"/> | ||
953 | + <constraint firstAttribute="width" constant="60" id="uzy-xp-hTl"/> | ||
954 | + </constraints> | ||
955 | + <fontDescription key="fontDescription" type="system" pointSize="13"/> | ||
956 | + <state key="normal" title="忘记密码"> | ||
957 | + <color key="titleColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
958 | + </state> | ||
959 | + <connections> | ||
960 | + <action selector="activatiAction:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="Al4-o1-Tj0"/> | ||
961 | + </connections> | ||
962 | + </button> | ||
963 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vmw-Ug-eCf"> | ||
964 | + <rect key="frame" x="297" y="68" width="60" height="21"/> | ||
965 | + <constraints> | ||
966 | + <constraint firstAttribute="width" constant="60" id="5Mx-rp-5ap"/> | ||
967 | + <constraint firstAttribute="height" constant="21" id="eJC-qs-Ybn"/> | ||
968 | + </constraints> | ||
969 | + <fontDescription key="fontDescription" type="system" pointSize="13"/> | ||
970 | + <state key="normal" title="注册账号"> | ||
971 | + <color key="titleColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
972 | + </state> | ||
973 | + <connections> | ||
974 | + <action selector="returnAction:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="9DX-YN-Sc1"/> | ||
975 | + </connections> | ||
976 | + </button> | ||
977 | + </subviews> | ||
978 | + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
979 | + <constraints> | ||
980 | + <constraint firstItem="d0Y-Gl-m8Z" firstAttribute="top" secondItem="ZS7-D8-cI3" secondAttribute="top" constant="8" id="MIL-Rx-WNH"/> | ||
981 | + <constraint firstItem="Oee-Sm-GxU" firstAttribute="leading" secondItem="ZS7-D8-cI3" secondAttribute="leading" constant="18" id="Mpo-za-g6n"/> | ||
982 | + <constraint firstAttribute="trailing" secondItem="d0Y-Gl-m8Z" secondAttribute="trailing" constant="18" id="Mqr-is-1wx"/> | ||
983 | + <constraint firstAttribute="trailing" secondItem="vmw-Ug-eCf" secondAttribute="trailing" constant="18" id="YDf-Zg-37t"/> | ||
984 | + <constraint firstItem="vmw-Ug-eCf" firstAttribute="top" secondItem="d0Y-Gl-m8Z" secondAttribute="bottom" constant="16" id="nrV-il-Xgj"/> | ||
985 | + <constraint firstItem="d0Y-Gl-m8Z" firstAttribute="leading" secondItem="ZS7-D8-cI3" secondAttribute="leading" constant="18" id="qvm-bv-yTq"/> | ||
986 | + <constraint firstItem="Oee-Sm-GxU" firstAttribute="top" secondItem="d0Y-Gl-m8Z" secondAttribute="bottom" constant="16" id="v0B-P7-6bL"/> | ||
987 | + </constraints> | ||
988 | + </view> | ||
989 | + </subviews> | ||
990 | + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
991 | + <constraints> | ||
992 | + <constraint firstItem="ZS7-D8-cI3" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="7UM-rB-lFl"/> | ||
993 | + <constraint firstItem="ZS7-D8-cI3" firstAttribute="top" secondItem="45M-7w-dCo" secondAttribute="bottom" id="CbL-jK-gnm"/> | ||
994 | + <constraint firstItem="45M-7w-dCo" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="Ccc-A4-FYr"/> | ||
995 | + <constraint firstItem="qaQ-kA-93Q" firstAttribute="top" secondItem="eHe-yf-D8O" secondAttribute="top" id="D97-8f-Vp0"/> | ||
996 | + <constraint firstItem="qaQ-kA-93Q" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="NZh-xD-ahk"/> | ||
997 | + <constraint firstItem="qaQ-kA-93Q" firstAttribute="height" secondItem="45M-7w-dCo" secondAttribute="height" id="VnS-XO-xBL"/> | ||
998 | + <constraint firstAttribute="height" secondItem="qaQ-kA-93Q" secondAttribute="height" multiplier="3" id="YyL-6W-t1Z"/> | ||
999 | + <constraint firstAttribute="trailing" secondItem="45M-7w-dCo" secondAttribute="trailing" id="aEd-FV-QqG"/> | ||
1000 | + <constraint firstAttribute="trailing" secondItem="qaQ-kA-93Q" secondAttribute="trailing" id="cho-Ns-D4h"/> | ||
1001 | + <constraint firstAttribute="height" constant="450" id="mqG-RY-Lo7"/> | ||
1002 | + <constraint firstAttribute="trailing" secondItem="ZS7-D8-cI3" secondAttribute="trailing" id="q5s-IS-ATm"/> | ||
1003 | + <constraint firstAttribute="bottom" secondItem="ZS7-D8-cI3" secondAttribute="bottom" id="r1q-06-arK"/> | ||
1004 | + <constraint firstItem="45M-7w-dCo" firstAttribute="top" secondItem="qaQ-kA-93Q" secondAttribute="bottom" id="ygB-hD-MeQ"/> | ||
1005 | + </constraints> | ||
1006 | + </view> | ||
1007 | + </subviews> | ||
1008 | + <color key="backgroundColor" red="0.96862745100000003" green="0.96862745100000003" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
1009 | + <constraints> | ||
1010 | + <constraint firstAttribute="trailing" secondItem="zyE-vu-SeI" secondAttribute="trailing" id="4UG-vm-nF7"/> | ||
1011 | + <constraint firstItem="zyE-vu-SeI" firstAttribute="leading" secondItem="U95-dB-O8D" secondAttribute="leading" id="Gac-kM-MUi"/> | ||
1012 | + <constraint firstItem="eHe-yf-D8O" firstAttribute="leading" secondItem="U95-dB-O8D" secondAttribute="leading" id="Mgw-8G-F7Z"/> | ||
1013 | + <constraint firstAttribute="centerY" secondItem="eHe-yf-D8O" secondAttribute="centerY" constant="20" id="MqN-UP-SP0"/> | ||
1014 | + <constraint firstAttribute="trailing" secondItem="eHe-yf-D8O" secondAttribute="trailing" id="SMc-NG-37w"/> | ||
1015 | + <constraint firstItem="eS2-l5-mzB" firstAttribute="top" secondItem="zyE-vu-SeI" secondAttribute="bottom" id="Uh1-h1-vQ4"/> | ||
1016 | + </constraints> | ||
1017 | + </view> | ||
1018 | + <connections> | ||
1019 | + <outlet property="buttonLogin" destination="d0Y-Gl-m8Z" id="QDU-R3-RGe"/> | ||
1020 | + <outlet property="constraintContentOffset" destination="MqN-UP-SP0" id="dpa-vk-fx3"/> | ||
1021 | + <outlet property="fieldAccount" destination="U1G-S8-74U" id="o8T-Qc-aFJ"/> | ||
1022 | + <outlet property="fieldPassword" destination="bnT-lO-cJS" id="ZgC-PY-d1y"/> | ||
1023 | + <outlet property="viewContent" destination="eHe-yf-D8O" id="cqQ-Vu-6em"/> | ||
1024 | + </connections> | ||
1025 | + </viewController> | ||
1026 | + <placeholder placeholderIdentifier="IBFirstResponder" id="OIH-zv-pxO" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
1027 | + </objects> | ||
1028 | + <point key="canvasLocation" x="175.19999999999999" y="5457.1214392803604"/> | ||
1029 | + </scene> | ||
785 | </scenes> | 1030 | </scenes> |
786 | <resources> | 1031 | <resources> |
787 | <image name="icon" width="512" height="512"/> | 1032 | <image name="icon" width="512" height="512"/> |
1033 | + <image name="login_account" width="27" height="27"/> | ||
788 | <image name="login_bottom2" width="318" height="124"/> | 1034 | <image name="login_bottom2" width="318" height="124"/> |
789 | - <image name="userId.png" width="36" height="56"/> | ||
790 | - <image name="userPassword.png" width="31" height="41"/> | 1035 | + <image name="login_password" width="27" height="27"/> |
791 | <image name="上传头像.png" width="70" height="70"/> | 1036 | <image name="上传头像.png" width="70" height="70"/> |
792 | <image name="编辑.png" width="35" height="31"/> | 1037 | <image name="编辑.png" width="35" height="31"/> |
793 | </resources> | 1038 | </resources> |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/NewLoginViewController.swift
0 → 100644
@@ -0,0 +1,139 @@ | @@ -0,0 +1,139 @@ | ||
1 | +// | ||
2 | +// NewLoginViewController.swift | ||
3 | +// youer | ||
4 | +// | ||
5 | +// Created by sinceredeveloper on 15/11/9. | ||
6 | +// Copyright (c) 2015年 kagami. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class NewLoginViewController: UIViewController,UITextFieldDelegate { | ||
12 | + @IBOutlet weak var viewContent: UIView! | ||
13 | + @IBOutlet weak var constraintContentOffset: NSLayoutConstraint! | ||
14 | + @IBOutlet weak var fieldAccount: UITextField! | ||
15 | + @IBOutlet weak var fieldPassword: UITextField! | ||
16 | + @IBOutlet weak var buttonLogin: UIButton! | ||
17 | + override func viewDidLoad() { | ||
18 | + super.viewDidLoad() | ||
19 | + constraintContentOffset.constant=20 | ||
20 | + view.backgroundColor=UIColorFromRGB(0xf7f7f7) | ||
21 | + Theme.configButton(buttonLogin) | ||
22 | + let lastAccount=Setting.getString("lastAccountNumber") | ||
23 | + fieldAccount.text=lastAccount | ||
24 | + } | ||
25 | + override func viewWillAppear(_ animated: Bool) { | ||
26 | + super.viewWillAppear(animated) | ||
27 | + NotificationCenter.default.addObserver(self, selector: #selector(NewLoginViewController.keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil) | ||
28 | + NotificationCenter.default.addObserver(self, selector: #selector(NewLoginViewController.keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil) | ||
29 | + fieldAccount.tintColor=Theme.topBarColor() | ||
30 | + fieldPassword.tintColor=Theme.topBarColor() | ||
31 | + } | ||
32 | + override func viewWillDisappear(_ animated: Bool) { | ||
33 | + super.viewWillDisappear(animated) | ||
34 | + NotificationCenter.default.removeObserver(self) | ||
35 | + } | ||
36 | + | ||
37 | + | ||
38 | + override func didReceiveMemoryWarning() { | ||
39 | + super.didReceiveMemoryWarning() | ||
40 | + // Dispose of any resources that can be recreated. | ||
41 | + } | ||
42 | + @IBAction func onLoginClicked(sender: AnyObject) { | ||
43 | + self.view.endEditing(true) | ||
44 | + let account=fieldAccount.text | ||
45 | + let pw=fieldPassword.text | ||
46 | + | ||
47 | + if (account?.characters.count)!<1 || pw!.characters.count<1 { | ||
48 | + self.view.makeToast("账号或密码不能为空") | ||
49 | + return | ||
50 | + } | ||
51 | + login(phone: account!, pw:pw!) | ||
52 | + } | ||
53 | + | ||
54 | + func login(phone:String, pw:String){ | ||
55 | + if phone.isMobilePhoneNumber() { | ||
56 | + SVProgressHUD.show(withStatus: "登录...") | ||
57 | + SVProgressHUD.setDefaultMaskType(.black) | ||
58 | + let parameters:Dictionary<String,AnyObject>=["grant_type":"password" as AnyObject,"username":phone as AnyObject,"password":pw as AnyObject] | ||
59 | + AppDelegate.instance().httpServer.login(parameters: parameters) { (str, error) in | ||
60 | + let json=JSON.fromString(jsonString: str) | ||
61 | + if let ret=json{ | ||
62 | + let er=ret["error"].string | ||
63 | + if let errorStr=er{ | ||
64 | + SVProgressHUD.dismiss() | ||
65 | + let Strings=errorStr.components(separatedBy:":") | ||
66 | + if Strings.count >= 2 { | ||
67 | + switch Strings[1] { | ||
68 | + //用户关联多个身份,请使用学事号登录:100 | ||
69 | + case "101"://用户认证身份不存在:101 | ||
70 | + AppDelegate.instance().window?.makeToast("用户认证身份不存在,请进行账号激活。") | ||
71 | + break | ||
72 | + //用户帐号或密码错误:102 | ||
73 | + case "103":// 用户不存在:103 | ||
74 | + AppDelegate.instance().window?.makeToast("该号码不存在,请联系客服400-826-2468") | ||
75 | + break | ||
76 | + default: | ||
77 | + AppDelegate.instance().window?.makeToast("\(errorStr)") | ||
78 | + break | ||
79 | + } | ||
80 | + }else{ | ||
81 | + AppDelegate.instance().window?.makeToast("\(errorStr)") | ||
82 | + } | ||
83 | + }else if ret["access_token"].stringValue != ""{ | ||
84 | + AppDelegate.instance().accountManager.setTokenInfo(tokenInfo: ret) | ||
85 | + AppDelegate.instance().accountManager.saveToken(tokenInfo: ret) | ||
86 | + AppDelegate.instance().accountManager.refreshUserInfo(completionHandler: { (finish) in | ||
87 | + if finish{ | ||
88 | + // self.loadUserInfo() | ||
89 | + SVProgressHUD.dismiss() | ||
90 | + self.back() | ||
91 | + }else{ | ||
92 | + AppDelegate.instance().window?.makeToast("身份获取失败") | ||
93 | + SVProgressHUD.dismiss() | ||
94 | + } | ||
95 | + }) | ||
96 | + }else{ | ||
97 | + SVProgressHUD.dismiss() | ||
98 | + AppDelegate.instance().window?.makeToast("登录失败,请稍后重试") | ||
99 | + } | ||
100 | + }else{ | ||
101 | + SVProgressHUD.dismiss() | ||
102 | + AppDelegate.instance().window?.makeToast("登录失败") | ||
103 | + } | ||
104 | + } | ||
105 | + }else{ | ||
106 | + self.view.makeToast("请输入正确手机号") | ||
107 | + } | ||
108 | + } | ||
109 | + func back(){ | ||
110 | + self.navigationController!.popViewController(animated: true) | ||
111 | + } | ||
112 | + | ||
113 | + | ||
114 | + @IBAction func activatiAction(sender: UIButton) { | ||
115 | + let vc = Story.instantiateViewControllerWithIdentifier("ChangePassWordViewControllerVC", storyName: "User") as! ChangePassWordViewController | ||
116 | + self.navigationController?.pushViewController(vc, animated: true) | ||
117 | + } | ||
118 | + @IBAction func returnAction(sender: UIButton) { | ||
119 | + let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: "RegisterViewControllerVC") as! RegisterViewController | ||
120 | + self.navigationController!.pushViewController(vc, animated: true) | ||
121 | + } | ||
122 | + | ||
123 | + func keyboardWillShow(){ | ||
124 | + constraintContentOffset.constant=144 | ||
125 | + UIView.animate(withDuration: 2, animations: { () -> Void in | ||
126 | + self.viewContent.layoutIfNeeded() | ||
127 | + }) | ||
128 | + | ||
129 | + } | ||
130 | + func keyboardWillHide(){ | ||
131 | + constraintContentOffset.constant=20 | ||
132 | + UIView.animate(withDuration: 2, animations: { () -> Void in | ||
133 | + self.viewContent.layoutIfNeeded() | ||
134 | + }) | ||
135 | + } | ||
136 | +} | ||
137 | + | ||
138 | + | ||
139 | + |
YouerLiveVideo/YouerLiveVideo/util/utiles.swift
@@ -146,7 +146,7 @@ extension UIViewController{ | @@ -146,7 +146,7 @@ extension UIViewController{ | ||
146 | self.navigationController?.navigationBar.barTintColor=Theme.topBarColor() | 146 | self.navigationController?.navigationBar.barTintColor=Theme.topBarColor() |
147 | self.navigationController?.navigationBar.tintColor=UIColor.white | 147 | self.navigationController?.navigationBar.tintColor=UIColor.white |
148 | self.navigationController?.navigationBar.isTranslucent=false | 148 | self.navigationController?.navigationBar.isTranslucent=false |
149 | - self.navigationController?.navigationBar.titleTextAttributes = {[NSForegroundColorAttributeName: UIColor.white]}()//Theme.topBarColor()]}() | 149 | + self.navigationController?.navigationBar.titleTextAttributes = {[NSForegroundColorAttributeName: UIColor.white,NSBackgroundColorAttributeName: Theme.topBarColor()]}()//Theme.topBarColor()]}() |
150 | } | 150 | } |
151 | ///套上UINavigationController | 151 | ///套上UINavigationController |
152 | func wrapWithNavigationController()->UINavigationController{ | 152 | func wrapWithNavigationController()->UINavigationController{ |