Commit a824de4247a869daf59819814c7ef2fbcaba09a7

Authored by 左丞
1 parent 235e5ed1
Exists in newLive

no message

YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj
... ... @@ -28,6 +28,7 @@
28 28 598939491ED3CFD8005DA462 /* UserEditViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 598939481ED3CFD8005DA462 /* UserEditViewController.swift */; };
29 29 5989394B1ED3CFF4005DA462 /* AppSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */; };
30 30 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394C1ED4016D005DA462 /* HistoryViewController.swift */; };
  31 + 598939501ED41C44005DA462 /* ChangePassWordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */; };
31 32 598A0E531E51941300273AB8 /* libNIMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4D1E51941300273AB8 /* libNIMSDK.a */; };
32 33 598A0E541E51941300273AB8 /* libaacplus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4F1E51941300273AB8 /* libaacplus.a */; };
33 34 598A0E551E51941300273AB8 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E501E51941300273AB8 /* libcrypto.a */; };
... ... @@ -244,6 +245,7 @@
244 245 598939481ED3CFD8005DA462 /* UserEditViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserEditViewController.swift; sourceTree = "<group>"; };
245 246 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppSettingViewController.swift; sourceTree = "<group>"; };
246 247 5989394C1ED4016D005DA462 /* HistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryViewController.swift; sourceTree = "<group>"; };
  248 + 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChangePassWordViewController.swift; sourceTree = "<group>"; };
247 249 598A0E121E51941300273AB8 /* NIMChatroom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroom.h; sourceTree = "<group>"; };
248 250 598A0E131E51941300273AB8 /* NIMChatroomEnterRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomEnterRequest.h; sourceTree = "<group>"; };
249 251 598A0E141E51941300273AB8 /* NIMChatroomMember.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomMember.h; sourceTree = "<group>"; };
... ... @@ -680,6 +682,14 @@
680 682 path = lib/DanmakuLib;
681 683 sourceTree = "<group>";
682 684 };
  685 + 5989394E1ED41C31005DA462 /* Setting */ = {
  686 + isa = PBXGroup;
  687 + children = (
  688 + 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */,
  689 + );
  690 + path = Setting;
  691 + sourceTree = "<group>";
  692 + };
683 693 598A0E0F1E51941300273AB8 /* SDK */ = {
684 694 isa = PBXGroup;
685 695 children = (
... ... @@ -1184,6 +1194,7 @@
1184 1194 598939481ED3CFD8005DA462 /* UserEditViewController.swift */,
1185 1195 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */,
1186 1196 5989394C1ED4016D005DA462 /* HistoryViewController.swift */,
  1197 + 5989394E1ED41C31005DA462 /* Setting */,
1187 1198 BFBB83DA1ECC445D008B404B /* UserCenter */,
1188 1199 );
1189 1200 path = User;
... ... @@ -1539,6 +1550,7 @@
1539 1550 BF25E0151DDAAF73003EC0C1 /* SVIndefiniteAnimatedView.m in Sources */,
1540 1551 BFF5F4921DD5B7CA00D33B89 /* SwiftyJSON.swift in Sources */,
1541 1552 5989394B1ED3CFF4005DA462 /* AppSettingViewController.swift in Sources */,
  1553 + 598939501ED41C44005DA462 /* ChangePassWordViewController.swift in Sources */,
1542 1554 BF682F1E1ECE8772007632CA /* MainHomeTableViewController.swift in Sources */,
1543 1555 BF7B75A91E305A6D0011D5C7 /* UIView+MJExtension.m in Sources */,
1544 1556 BF25DFEE1DDAA36A003EC0C1 /* Result.swift in Sources */,
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/AppSettingViewController.swift
... ... @@ -9,7 +9,7 @@
9 9 import UIKit
10 10  
11 11 class AppSettingViewController: UIViewController {
12   -
  12 + var titleArr:[String] = ["密码修改"]
13 13 override func viewDidLoad() {
14 14 super.viewDidLoad()
15 15  
... ... @@ -21,6 +21,16 @@ class AppSettingViewController: UIViewController {
21 21 // Dispose of any resources that can be recreated.
22 22 }
23 23  
  24 + override func viewWillAppear(_ animated: Bool) {
  25 + super.viewWillAppear(animated)
  26 + self.tabBarController?.tabBar.isHidden = true
  27 + }
  28 +
  29 + override func viewWillDisappear(_ animated: Bool) {
  30 + super.viewWillDisappear(animated)
  31 + self.tabBarController?.hidesBottomBarWhenPushed = false
  32 + }
  33 +
24 34  
25 35 /*
26 36 // MARK: - Navigation
... ... @@ -33,3 +43,60 @@ class AppSettingViewController: UIViewController {
33 43 */
34 44  
35 45 }
  46 +
  47 +extension AppSettingViewController:UITableViewDelegate,UITableViewDataSource{
  48 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  49 + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! AppSettingCell
  50 + cell.titleName.text = titleArr[indexPath.row]
  51 + return cell
  52 + }
  53 +
  54 + func numberOfSections(in tableView: UITableView) -> Int {
  55 + return titleArr.count
  56 + }
  57 +
  58 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  59 + return 1
  60 + }
  61 +
  62 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  63 + switch indexPath.section {
  64 + case 0:
  65 + let vc = Story.instantiateViewControllerWithIdentifier("ChangePassWordViewControllerVC", storyName: "User") as! ChangePassWordViewController
  66 + vc.title = "密码修改"
  67 + self.navigationController?.pushViewController(vc, animated: true)
  68 + break
  69 + default:
  70 + break
  71 + }
  72 + }
  73 +
  74 + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
  75 + let view = UILabel(frame: CGRect(x:0,y:0,width:getScreenWidth(),height:1))
  76 + view.backgroundColor = tableView.backgroundColor
  77 + return view
  78 + }
  79 +
  80 + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
  81 + let view = UILabel(frame: CGRect(x:0,y:0,width:getScreenWidth(),height:15))
  82 + view.backgroundColor = tableView.backgroundColor
  83 + return view
  84 +
  85 + }
  86 + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
  87 + return 1
  88 + }
  89 +
  90 + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
  91 + return 15
  92 + }
  93 +}
  94 +
  95 +
  96 +
  97 +class AppSettingCell: UITableViewCell {
  98 +
  99 +
  100 + @IBOutlet weak var titleName: UILabel!
  101 +
  102 +}
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/HistoryViewController.swift
... ... @@ -13,18 +13,32 @@ class HistoryViewController: UIViewController {
13 13 @IBOutlet weak var collectionView: UICollectionView!
14 14  
15 15 var datatSet:[TVStationSubject] = []
16   - var type:Int = 0// 资源类型 0-微课 1-资源 2-电视台
  16 + var type:Int = 0// 资源类型 0-微课 1-资源
  17 + var isHistory:Int = 0
17 18 override func viewDidLoad() {
18 19 super.viewDidLoad()
19   - AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in
20   - httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
21   - for item in json.contentData()["resultData"].arrayValue{
22   - self.datatSet.append(TVStationSubject(json: item))
23   - }
24   - self.collectionView.reloadData()
25   - }, failHandler: { (error) in
26   -
27   - })
  20 + if isHistory == 0{
  21 + AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in
  22 + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
  23 + for item in json.contentData()["resultData"].arrayValue{
  24 + self.datatSet.append(TVStationSubject(json: item))
  25 + }
  26 + self.collectionView.reloadData()
  27 + }, failHandler: { (error) in
  28 +
  29 + })
  30 + }
  31 + }else{
  32 + AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in
  33 + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
  34 + for item in json.contentData()["resultData"].arrayValue{
  35 + self.datatSet.append(TVStationSubject(json: item))
  36 + }
  37 + self.collectionView.reloadData()
  38 + }, failHandler: { (error) in
  39 +
  40 + })
  41 + }
28 42 }
29 43 // Do any additional setup after loading the view.
30 44 }
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift 0 → 100644
... ... @@ -0,0 +1,84 @@
  1 +//
  2 +// ChangePassWordViewController.swift
  3 +// YouerLiveVideo
  4 +//
  5 +// Created by 左丞 on 2017/5/23.
  6 +// Copyright © 2017年 左丞. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class ChangePassWordViewController: UIViewController {
  12 +
  13 + @IBOutlet weak var scrollView: UIScrollView!
  14 + @IBOutlet weak var scrollViewHeight: NSLayoutConstraint!
  15 +
  16 + @IBOutlet weak var passwordTextFiled: UITextField!
  17 + @IBOutlet weak var agrenPasswordTextFiled: UITextField!
  18 + @IBOutlet weak var userCodeTextFiled: UITextField!
  19 +
  20 +
  21 + var scrollViewH:CGFloat!
  22 +
  23 + @IBAction func editKeyboard(_ sender: Any) {
  24 + self.view.endEditing(true)
  25 + }
  26 +
  27 + override func viewDidLoad() {
  28 + super.viewDidLoad()
  29 + scrollViewH = scrollViewHeight.constant
  30 + NotificationCenter.default.addObserver(self, selector: #selector(ChangePassWordViewController.keyboardWIllChange), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
  31 +
  32 + // Do any additional setup after loading the view.
  33 + }
  34 +
  35 + override func didReceiveMemoryWarning() {
  36 + super.didReceiveMemoryWarning()
  37 + // Dispose of any resources that can be recreated.
  38 + }
  39 +
  40 + @IBAction func agrenChangePasswordBtnClick(_ sender: UIButton) {
  41 +
  42 + }
  43 +
  44 + @IBAction func sendUserCodeBtnClick(_ sender: UIButton) {
  45 +
  46 + }
  47 +
  48 + // MARK: - 输入密码点击return回收键盘
  49 + func textFieldShouldReturn(_ textField: UITextField) -> Bool {
  50 + textField.resignFirstResponder()
  51 + return true
  52 + }
  53 + // MARK: - 键盘监听
  54 + func keyboardWIllChange(noti: NSNotification){
  55 + let userInfo:NSDictionary=noti.userInfo! as NSDictionary
  56 + let endFrame=(userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue
  57 + if endFrame?.origin.y==getScreenHeight() {
  58 + scrollViewHeight.constant=scrollViewH
  59 + }else{
  60 + if ((endFrame?.origin.y)!-64) < scrollViewH {
  61 + scrollViewHeight.constant=((endFrame?.origin.y)!-64)
  62 + }else{
  63 + scrollViewHeight.constant=scrollViewH
  64 + }
  65 + }
  66 + }
  67 + // MARK: - 销毁通知
  68 + deinit {
  69 + NotificationCenter.default.removeObserver(self)
  70 + }
  71 +
  72 + /*
  73 + // MARK: - Navigation
  74 +
  75 + // In a storyboard-based application, you will often want to do a little preparation before navigation
  76 + override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  77 + // Get the new view controller using segue.destinationViewController.
  78 + // Pass the selected object to the new view controller.
  79 + }
  80 + */
  81 +
  82 +}
  83 +
  84 +
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/User.storyboard
... ... @@ -167,12 +167,309 @@
167 167 <view key="view" contentMode="scaleToFill" id="BaA-H1-b7T">
168 168 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
169 169 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  170 + <subviews>
  171 + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="RU1-zL-XaA">
  172 + <rect key="frame" x="0.0" y="20" width="375" height="577"/>
  173 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  174 + <prototypes>
  175 + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="cell" id="6lf-ye-czT" customClass="AppSettingCell" customModule="YouerLiveVideo" customModuleProvider="target">
  176 + <rect key="frame" x="0.0" y="28" width="375" height="44"/>
  177 + <autoresizingMask key="autoresizingMask"/>
  178 + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6lf-ye-czT" id="EpN-M2-4mo">
  179 + <rect key="frame" x="0.0" y="0.0" width="342" height="44"/>
  180 + <autoresizingMask key="autoresizingMask"/>
  181 + <subviews>
  182 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wrs-53-euO">
  183 + <rect key="frame" x="16" y="11" width="42" height="21"/>
  184 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  185 + <nil key="textColor"/>
  186 + <nil key="highlightedColor"/>
  187 + </label>
  188 + </subviews>
  189 + <constraints>
  190 + <constraint firstItem="wrs-53-euO" firstAttribute="leading" secondItem="EpN-M2-4mo" secondAttribute="leading" constant="16" id="ce2-Gd-BXl"/>
  191 + <constraint firstItem="wrs-53-euO" firstAttribute="centerY" secondItem="EpN-M2-4mo" secondAttribute="centerY" id="qO6-ij-bMv"/>
  192 + </constraints>
  193 + </tableViewCellContentView>
  194 + <connections>
  195 + <outlet property="titleName" destination="wrs-53-euO" id="ar5-gT-Peh"/>
  196 + </connections>
  197 + </tableViewCell>
  198 + </prototypes>
  199 + <connections>
  200 + <outlet property="dataSource" destination="DOf-c9-nNw" id="M1L-uf-l3f"/>
  201 + <outlet property="delegate" destination="DOf-c9-nNw" id="fXo-ce-spA"/>
  202 + </connections>
  203 + </tableView>
  204 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pPn-F1-n9K">
  205 + <rect key="frame" x="0.0" y="597" width="375" height="70"/>
  206 + <subviews>
  207 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qpd-f0-dKF">
  208 + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
  209 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  210 + <constraints>
  211 + <constraint firstAttribute="height" constant="1" id="45v-g5-KI8"/>
  212 + </constraints>
  213 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  214 + <nil key="textColor"/>
  215 + <nil key="highlightedColor"/>
  216 + </label>
  217 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CIJ-c9-Tc0">
  218 + <rect key="frame" x="50" y="11" width="274" height="48"/>
  219 + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
  220 + <state key="normal" title="退出当前账号">
  221 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  222 + </state>
  223 + </button>
  224 + </subviews>
  225 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  226 + <constraints>
  227 + <constraint firstAttribute="trailing" secondItem="Qpd-f0-dKF" secondAttribute="trailing" id="7tR-mL-cT5"/>
  228 + <constraint firstAttribute="height" constant="70" id="ETn-OW-sdW"/>
  229 + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="top" secondItem="Qpd-f0-dKF" secondAttribute="bottom" constant="10" id="bEc-1f-7Ff"/>
  230 + <constraint firstItem="Qpd-f0-dKF" firstAttribute="top" secondItem="pPn-F1-n9K" secondAttribute="top" id="cba-oN-PUb"/>
  231 + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="centerY" secondItem="pPn-F1-n9K" secondAttribute="centerY" id="hyB-EM-Ohu"/>
  232 + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="leading" secondItem="pPn-F1-n9K" secondAttribute="leading" constant="50" id="kCo-OY-3EF"/>
  233 + <constraint firstItem="Qpd-f0-dKF" firstAttribute="leading" secondItem="pPn-F1-n9K" secondAttribute="leading" id="ojR-h1-w1Z"/>
  234 + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="centerX" secondItem="pPn-F1-n9K" secondAttribute="centerX" id="s4p-Dq-MJz"/>
  235 + </constraints>
  236 + </view>
  237 + </subviews>
170 238 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  239 + <constraints>
  240 + <constraint firstItem="pPn-F1-n9K" firstAttribute="leading" secondItem="BaA-H1-b7T" secondAttribute="leading" id="0Bi-aX-P1k"/>
  241 + <constraint firstItem="ZkS-Lb-DA8" firstAttribute="top" secondItem="pPn-F1-n9K" secondAttribute="bottom" id="0r4-3W-Ify"/>
  242 + <constraint firstAttribute="trailing" secondItem="pPn-F1-n9K" secondAttribute="trailing" id="K3f-78-bFd"/>
  243 + <constraint firstItem="RU1-zL-XaA" firstAttribute="leading" secondItem="BaA-H1-b7T" secondAttribute="leading" id="Rpb-Ug-YCv"/>
  244 + <constraint firstItem="RU1-zL-XaA" firstAttribute="top" secondItem="UTZ-Kh-YfO" secondAttribute="bottom" id="gIV-4m-XSg"/>
  245 + <constraint firstAttribute="trailing" secondItem="RU1-zL-XaA" secondAttribute="trailing" id="ml9-a6-THg"/>
  246 + <constraint firstItem="pPn-F1-n9K" firstAttribute="top" secondItem="RU1-zL-XaA" secondAttribute="bottom" id="voC-9E-czN"/>
  247 + </constraints>
171 248 </view>
172 249 </viewController>
173 250 <placeholder placeholderIdentifier="IBFirstResponder" id="44z-Sl-H4j" userLabel="First Responder" sceneMemberID="firstResponder"/>
174 251 </objects>
175   - <point key="canvasLocation" x="1510" y="-131"/>
  252 + <point key="canvasLocation" x="1509.5999999999999" y="-131.78410794602701"/>
  253 + </scene>
  254 + <!--Change Pass Word View Controller-->
  255 + <scene sceneID="opx-Sc-v2W">
  256 + <objects>
  257 + <viewController storyboardIdentifier="ChangePassWordViewControllerVC" id="HIn-e8-Pzh" customClass="ChangePassWordViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController">
  258 + <layoutGuides>
  259 + <viewControllerLayoutGuide type="top" id="fMj-B9-eEF"/>
  260 + <viewControllerLayoutGuide type="bottom" id="Gxk-Dg-G3D"/>
  261 + </layoutGuides>
  262 + <view key="view" contentMode="scaleToFill" id="bs0-1B-XZt" customClass="UIControl">
  263 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  264 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  265 + <subviews>
  266 + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Vd-3T-3CR">
  267 + <rect key="frame" x="0.0" y="0.0" width="375" height="597"/>
  268 + <subviews>
  269 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1DA-t8-OEm">
  270 + <rect key="frame" x="0.0" y="0.0" width="375" height="597"/>
  271 + <subviews>
  272 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YjI-UW-Ova">
  273 + <rect key="frame" x="0.0" y="100" width="375" height="50"/>
  274 + <subviews>
  275 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您收到的验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-hq-Nhp">
  276 + <rect key="frame" x="20" y="17" width="147" height="17"/>
  277 + <nil key="textColor"/>
  278 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  279 + <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
  280 + <connections>
  281 + <outlet property="delegate" destination="HIn-e8-Pzh" id="Rk2-Rg-WTc"/>
  282 + </connections>
  283 + </textField>
  284 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lFa-PY-Lg1">
  285 + <rect key="frame" x="16" y="49" width="343" height="1"/>
  286 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  287 + <constraints>
  288 + <constraint firstAttribute="height" constant="1" id="Lfw-Yi-UtD"/>
  289 + </constraints>
  290 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  291 + <nil key="textColor"/>
  292 + <nil key="highlightedColor"/>
  293 + </label>
  294 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i2a-hL-oad">
  295 + <rect key="frame" x="274" y="10" width="85" height="30"/>
  296 + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
  297 + <state key="normal" title=" 获取验证码 ">
  298 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  299 + </state>
  300 + <connections>
  301 + <action selector="sendUserCodeBtnClick:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Hmd-rM-a0h"/>
  302 + </connections>
  303 + </button>
  304 + </subviews>
  305 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  306 + <constraints>
  307 + <constraint firstItem="i2a-hL-oad" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="6tN-tx-hH2"/>
  308 + <constraint firstItem="lFa-PY-Lg1" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="16" id="AUg-bg-Q14"/>
  309 + <constraint firstAttribute="bottom" secondItem="lFa-PY-Lg1" secondAttribute="bottom" id="KLR-8O-Gec"/>
  310 + <constraint firstItem="dtg-hq-Nhp" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="20" id="Tbt-To-MnF"/>
  311 + <constraint firstItem="lFa-PY-Lg1" firstAttribute="centerX" secondItem="YjI-UW-Ova" secondAttribute="centerX" id="UMn-tr-iSe"/>
  312 + <constraint firstAttribute="height" constant="50" id="Zdw-rZ-eCg"/>
  313 + <constraint firstAttribute="trailing" secondItem="i2a-hL-oad" secondAttribute="trailing" constant="16" id="nhQ-oH-HBd"/>
  314 + <constraint firstItem="dtg-hq-Nhp" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="pYp-kV-v06"/>
  315 + <constraint firstItem="i2a-hL-oad" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="dtg-hq-Nhp" secondAttribute="trailing" constant="8" id="tCf-jM-Z0F"/>
  316 + </constraints>
  317 + </view>
  318 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DSL-73-rUm">
  319 + <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
  320 + <subviews>
  321 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KOX-8X-bEC">
  322 + <rect key="frame" x="20" y="17" width="335" height="17"/>
  323 + <nil key="textColor"/>
  324 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  325 + <textInputTraits key="textInputTraits"/>
  326 + <connections>
  327 + <outlet property="delegate" destination="HIn-e8-Pzh" id="JRe-kh-lW4"/>
  328 + </connections>
  329 + </textField>
  330 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNz-Dn-QcJ">
  331 + <rect key="frame" x="16" y="49" width="343" height="1"/>
  332 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  333 + <constraints>
  334 + <constraint firstAttribute="height" constant="1" id="jO2-yd-Lfd"/>
  335 + </constraints>
  336 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  337 + <nil key="textColor"/>
  338 + <nil key="highlightedColor"/>
  339 + </label>
  340 + </subviews>
  341 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  342 + <constraints>
  343 + <constraint firstAttribute="height" constant="50" id="CLT-v4-ZkO"/>
  344 + <constraint firstItem="KOX-8X-bEC" firstAttribute="centerX" secondItem="DSL-73-rUm" secondAttribute="centerX" id="M4r-zi-VnB"/>
  345 + <constraint firstItem="xNz-Dn-QcJ" firstAttribute="centerX" secondItem="DSL-73-rUm" secondAttribute="centerX" id="iTN-UG-68h"/>
  346 + <constraint firstItem="KOX-8X-bEC" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="20" id="nTe-NB-Iit"/>
  347 + <constraint firstAttribute="bottom" secondItem="xNz-Dn-QcJ" secondAttribute="bottom" id="o8H-LN-340"/>
  348 + <constraint firstItem="KOX-8X-bEC" firstAttribute="centerY" secondItem="DSL-73-rUm" secondAttribute="centerY" id="oJc-1J-siL"/>
  349 + <constraint firstItem="xNz-Dn-QcJ" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="16" id="uSC-7n-UlI"/>
  350 + </constraints>
  351 + </view>
  352 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PPf-BI-ZxE">
  353 + <rect key="frame" x="0.0" y="50" width="375" height="50"/>
  354 + <subviews>
  355 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请重复您输入的新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Qzh-5W-Fdl">
  356 + <rect key="frame" x="20" y="16.5" width="335" height="17"/>
  357 + <nil key="textColor"/>
  358 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  359 + <textInputTraits key="textInputTraits"/>
  360 + <connections>
  361 + <outlet property="delegate" destination="HIn-e8-Pzh" id="3FT-zT-ACD"/>
  362 + </connections>
  363 + </textField>
  364 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5c-gx-Rlr">
  365 + <rect key="frame" x="16" y="49" width="343" height="1"/>
  366 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  367 + <constraints>
  368 + <constraint firstAttribute="height" constant="1" id="h8G-PP-6FW"/>
  369 + </constraints>
  370 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  371 + <nil key="textColor"/>
  372 + <nil key="highlightedColor"/>
  373 + </label>
  374 + </subviews>
  375 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  376 + <constraints>
  377 + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="centerX" secondItem="PPf-BI-ZxE" secondAttribute="centerX" id="ACg-OY-kid"/>
  378 + <constraint firstItem="g5c-gx-Rlr" firstAttribute="centerX" secondItem="PPf-BI-ZxE" secondAttribute="centerX" id="GIy-fQ-NqG"/>
  379 + <constraint firstAttribute="bottom" secondItem="g5c-gx-Rlr" secondAttribute="bottom" id="VsV-v8-cnP"/>
  380 + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="20" id="XxL-fd-Xdk"/>
  381 + <constraint firstAttribute="height" constant="50" id="Z4s-6F-BRm"/>
  382 + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="centerY" secondItem="PPf-BI-ZxE" secondAttribute="centerY" id="bP8-Ie-B5l"/>
  383 + <constraint firstItem="g5c-gx-Rlr" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="16" id="mJw-dS-wNd"/>
  384 + </constraints>
  385 + </view>
  386 + </subviews>
  387 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  388 + <constraints>
  389 + <constraint firstAttribute="trailing" secondItem="YjI-UW-Ova" secondAttribute="trailing" id="4og-BG-yQ2"/>
  390 + <constraint firstItem="YjI-UW-Ova" firstAttribute="top" secondItem="PPf-BI-ZxE" secondAttribute="bottom" id="EVk-W9-6ha"/>
  391 + <constraint firstAttribute="trailing" secondItem="PPf-BI-ZxE" secondAttribute="trailing" id="KSD-tV-fyr"/>
  392 + <constraint firstAttribute="height" constant="597" id="O1w-LD-ENA"/>
  393 + <constraint firstItem="DSL-73-rUm" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="P4W-fB-mdJ"/>
  394 + <constraint firstItem="PPf-BI-ZxE" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="SZy-V6-tVw"/>
  395 + <constraint firstItem="PPf-BI-ZxE" firstAttribute="top" secondItem="DSL-73-rUm" secondAttribute="bottom" id="YFk-eX-dg9"/>
  396 + <constraint firstItem="YjI-UW-Ova" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="ZW2-Ge-UHU"/>
  397 + <constraint firstItem="DSL-73-rUm" firstAttribute="top" secondItem="1DA-t8-OEm" secondAttribute="top" id="fhq-vI-7jW"/>
  398 + <constraint firstAttribute="trailing" secondItem="DSL-73-rUm" secondAttribute="trailing" id="rjR-sC-f1X"/>
  399 + </constraints>
  400 + </view>
  401 + </subviews>
  402 + <constraints>
  403 + <constraint firstAttribute="bottom" secondItem="1DA-t8-OEm" secondAttribute="bottom" id="SgU-Q9-eey"/>
  404 + <constraint firstItem="1DA-t8-OEm" firstAttribute="centerX" secondItem="8Vd-3T-3CR" secondAttribute="centerX" id="V9c-vU-aiU"/>
  405 + <constraint firstItem="1DA-t8-OEm" firstAttribute="top" secondItem="8Vd-3T-3CR" secondAttribute="top" id="c1T-M8-TiB"/>
  406 + <constraint firstItem="1DA-t8-OEm" firstAttribute="leading" secondItem="8Vd-3T-3CR" secondAttribute="leading" id="dFv-uc-gPl"/>
  407 + <constraint firstAttribute="trailing" secondItem="1DA-t8-OEm" secondAttribute="trailing" id="hCM-VP-Yxf"/>
  408 + <constraint firstAttribute="height" constant="597" id="riU-A5-eXR"/>
  409 + </constraints>
  410 + </scrollView>
  411 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="whH-Oe-owS">
  412 + <rect key="frame" x="0.0" y="597" width="375" height="70"/>
  413 + <subviews>
  414 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kVt-8Z-dIm">
  415 + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
  416 + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  417 + <constraints>
  418 + <constraint firstAttribute="height" constant="1" id="sVm-Ul-Tks"/>
  419 + </constraints>
  420 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  421 + <nil key="textColor"/>
  422 + <nil key="highlightedColor"/>
  423 + </label>
  424 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a1z-OP-RVi">
  425 + <rect key="frame" x="50" y="11" width="274" height="48"/>
  426 + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
  427 + <state key="normal" title="确认修改">
  428 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  429 + </state>
  430 + <connections>
  431 + <action selector="agrenChangePasswordBtnClick:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="qqi-Og-eWN"/>
  432 + </connections>
  433 + </button>
  434 + </subviews>
  435 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  436 + <constraints>
  437 + <constraint firstAttribute="height" constant="70" id="2q1-vd-aIj"/>
  438 + <constraint firstItem="a1z-OP-RVi" firstAttribute="top" secondItem="kVt-8Z-dIm" secondAttribute="bottom" constant="10" id="Cer-Vw-jgp"/>
  439 + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerY" secondItem="whH-Oe-owS" secondAttribute="centerY" id="JRI-y7-sxw"/>
  440 + <constraint firstItem="kVt-8Z-dIm" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="top" id="TJw-qg-Xj5"/>
  441 + <constraint firstAttribute="trailing" secondItem="kVt-8Z-dIm" secondAttribute="trailing" id="Yft-zB-u6I"/>
  442 + <constraint firstItem="kVt-8Z-dIm" firstAttribute="leading" secondItem="whH-Oe-owS" secondAttribute="leading" id="Yyc-Md-Jf6"/>
  443 + <constraint firstItem="a1z-OP-RVi" firstAttribute="leading" secondItem="whH-Oe-owS" secondAttribute="leading" constant="50" id="bj3-p2-4Ev"/>
  444 + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerX" secondItem="whH-Oe-owS" secondAttribute="centerX" id="wX9-9q-dFe"/>
  445 + </constraints>
  446 + </view>
  447 + </subviews>
  448 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  449 + <constraints>
  450 + <constraint firstItem="whH-Oe-owS" firstAttribute="top" secondItem="8Vd-3T-3CR" secondAttribute="bottom" id="71h-u4-NXV"/>
  451 + <constraint firstAttribute="trailing" secondItem="8Vd-3T-3CR" secondAttribute="trailing" id="9MH-8S-tRA"/>
  452 + <constraint firstItem="whH-Oe-owS" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="B4t-9D-S3Q"/>
  453 + <constraint firstItem="8Vd-3T-3CR" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="H8g-fx-ewt"/>
  454 + <constraint firstItem="Gxk-Dg-G3D" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="bottom" id="LnM-uu-3er"/>
  455 + <constraint firstItem="8Vd-3T-3CR" firstAttribute="top" secondItem="bs0-1B-XZt" secondAttribute="top" id="MkB-mh-yZy"/>
  456 + <constraint firstAttribute="trailing" secondItem="whH-Oe-owS" secondAttribute="trailing" id="uLu-dR-hbo"/>
  457 + </constraints>
  458 + <connections>
  459 + <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/>
  460 + </connections>
  461 + </view>
  462 + <connections>
  463 + <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/>
  464 + <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/>
  465 + <outlet property="scrollView" destination="8Vd-3T-3CR" id="dEo-pi-u7a"/>
  466 + <outlet property="scrollViewHeight" destination="riU-A5-eXR" id="ihQ-Ne-Y5c"/>
  467 + <outlet property="userCodeTextFiled" destination="dtg-hq-Nhp" id="ZYP-US-SH2"/>
  468 + </connections>
  469 + </viewController>
  470 + <placeholder placeholderIdentifier="IBFirstResponder" id="kXj-Be-3l7" userLabel="First Responder" sceneMemberID="firstResponder"/>
  471 + </objects>
  472 + <point key="canvasLocation" x="776.79999999999995" y="550.97451274362822"/>
176 473 </scene>
177 474 <!--History View Controller-->
178 475 <scene sceneID="U2w-Je-5CE">
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserEditViewController.swift
... ... @@ -19,7 +19,6 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate,
19 19 override func viewDidLoad() {
20 20 super.viewDidLoad()
21 21 setContentArr()
22   -
23 22 // Do any additional setup after loading the view.
24 23 }
25 24  
... ... @@ -32,6 +31,18 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate,
32 31 }
33 32 contentArr = [user.name(),user.userid,ident,user.schoolName()]
34 33 }
  34 +
  35 + override func viewWillAppear(_ animated: Bool) {
  36 + super.viewWillAppear(animated)
  37 + self.tabBarController?.tabBar.isHidden = true
  38 + }
  39 +
  40 + override func viewWillDisappear(_ animated: Bool) {
  41 + super.viewWillDisappear(animated)
  42 + self.tabBarController?.hidesBottomBarWhenPushed = false
  43 + }
  44 +
  45 +
35 46  
36 47 override func didReceiveMemoryWarning() {
37 48 super.didReceiveMemoryWarning()
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserViewController.swift
... ... @@ -14,8 +14,11 @@ class UserViewController: UIViewController {
14 14 @IBOutlet weak var historyList: UITableView!
15 15 @IBOutlet weak var userName: UILabel!
16 16 @IBOutlet weak var userPhoto: UIImageView!
17   - var historyType:[String] = ["微课","校园资源库","校园电视台"]
  17 + var historyType:[String] = ["资源历史","微课历史"]
  18 + var myResourceType:[String] = ["我的资源","我的微课"]
  19 + var sectionList:[String] = ["历史记录","我的"]
18 20 var isCloseHistoryList:Bool = false
  21 + var isCloseMyResource:Bool = false
19 22 override func viewDidLoad() {
20 23 super.viewDidLoad()
21 24 self.configTheme()
... ... @@ -38,22 +41,30 @@ class UserViewController: UIViewController {
38 41 }
39 42  
40 43 @IBAction func userEditClcik(_ sender: Any) {
41   - print("编译个人资料")
42 44 let vc = Story.instantiateViewControllerWithIdentifier("UserEditViewControllerVC", storyName: "User") as! UserEditViewController
43 45 self.navigationController?.pushViewController(vc, animated: true)
44 46 }
45 47  
46 48 func editBtnClick(){
47   - print("编译设置")
48 49 let vc = Story.instantiateViewControllerWithIdentifier("AppSettingViewControllerVC", storyName: "User") as! AppSettingViewController
  50 + vc.title = "设置"
49 51 self.navigationController?.pushViewController(vc, animated: true)
50 52 }
51 53  
52 54 func headerTap(tap:UITapGestureRecognizer){
53   - isCloseHistoryList = !isCloseHistoryList
  55 + if tap.view?.tag == 200{
  56 + isCloseHistoryList = !isCloseHistoryList
  57 + }else{
  58 + isCloseMyResource = !isCloseMyResource
  59 + }
54 60 historyList.reloadData()
55 61 }
56 62  
  63 + override func viewWillAppear(_ animated: Bool) {
  64 + super.viewWillAppear(animated)
  65 + self.tabBarController?.tabBar.isHidden = false
  66 + }
  67 +
57 68 /*
58 69 // MARK: - Navigation
59 70  
... ... @@ -72,6 +83,7 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
72 83 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
73 84 let vc = Story.instantiateViewControllerWithIdentifier("HistoryViewControllerVC", storyName: "User") as! HistoryViewController
74 85 vc.type = indexPath.row
  86 + vc.isHistory = indexPath.section
75 87 vc.title = historyType[indexPath.row]
76 88 self.navigationController?.pushViewController(vc, animated: true)
77 89 }
... ... @@ -83,21 +95,30 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
83 95 }
84 96  
85 97 func numberOfSections(in tableView: UITableView) -> Int {
86   - return 1
  98 + return sectionList.count
87 99 }
88 100  
89 101 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
90   - if isCloseHistoryList {
  102 + if section == 0{
  103 + if isCloseHistoryList{
  104 + return 0
  105 + }
  106 + return historyType.count
  107 + }else if section == 1{
  108 + if isCloseMyResource{
  109 + return 0
  110 + }
  111 + return myResourceType.count
  112 + }else{
91 113 return 0
92 114 }
93   - return historyType.count
94 115 }
95 116  
96 117 func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
97 118 let headerView = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44))
98 119 headerView.backgroundColor = UIColor.white
99 120 let label = UILabel(frame: CGRect(x: 8, y: headerView.frame.height/2-10, width: 100, height: 21))
100   - label.text = "历史记录"
  121 + label.text = sectionList[section]
101 122 label.sizeToFit()
102 123 headerView.addSubview(label)
103 124  
... ... @@ -106,7 +127,10 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
106 127 image.image = #imageLiteral(resourceName: "arrow")
107 128 image.isUserInteractionEnabled = true
108 129 var angle:Double = 0
109   - if !isCloseHistoryList{
  130 + if !isCloseHistoryList && section == 0{
  131 + angle = M_PI_2
  132 + }
  133 + if !isCloseMyResource && section == 1{
110 134 angle = M_PI_2
111 135 }
112 136 image.transform = CGAffineTransform(rotationAngle: CGFloat(angle))
... ... @@ -115,7 +139,7 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
115 139 let line = UILabel(frame: CGRect(x: 0, y: headerView.frame.height-1, width: getScreenWidth(), height: 1))
116 140 line.backgroundColor = historyList.backgroundColor
117 141 headerView.addSubview(line)
118   -
  142 + headerView.tag = 200+section
119 143 headerView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(UserViewController.headerTap(tap:))))
120 144 return headerView
121 145 }
... ... @@ -128,8 +152,6 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
128 152 return 1
129 153 }
130 154  
131   -
132   -
133 155 }
134 156  
135 157 class UserCenterHistoryCell:UITableViewCell{
... ...