Commit 89c4d4af92dc7cff6bf1b3c1c375b11704b035e3

Authored by 葛建军
1 parent 57fd0481
Exists in newLive

no message

YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift
... ... @@ -22,29 +22,22 @@ class ChangePassWordViewController: UIViewController {
22 22 @IBOutlet weak var agrenPasswordTextFiled: UITextField!
23 23 @IBOutlet weak var userCodeTextFiled: UITextField!
24 24  
25   - @IBOutlet var cancleItem: UIBarButtonItem!
26 25 var timer:Timer!
27 26 var scrollViewH:CGFloat = 200
28 27 var user = AppDelegate.instance().accountManager
29 28 @IBAction func editKeyboard(_ sender: Any) {
30 29 self.view.endEditing(true)
31 30 }
32   -
33   - @IBAction func cancleAction(_ sender: UIBarButtonItem) {
34   - self.dismiss(animated: true, completion: nil)
35   - }
36 31 override func viewDidLoad() {
37 32 super.viewDidLoad()
38 33 if user.isOnline() {
39 34 self.title="密码修改"
40   - self.navigationItem.rightBarButtonItem=nil
41 35 phonrView.isHidden=true
42 36 phoneViewHeight.constant=0
43 37 scrollViewH=150
44 38 }else{
45 39 self.configTheme()
46 40 self.title="忘记密码"
47   - self.navigationItem.rightBarButtonItem=cancleItem
48 41 phonrView.isHidden=false
49 42 phoneViewHeight.constant=50
50 43 scrollViewH=200
... ... @@ -94,10 +87,8 @@ class ChangePassWordViewController: UIViewController {
94 87 httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
95 88 if !self.user.isOnline() {
96 89 NotificationCenter.default.post(name: NSNotification.Name(rawValue: "refreshLoginUser"), object: phone)
97   - self.dismiss(animated: true, completion: nil)
98   - }else{
99   - self.navigationController!.popViewController(animated: true)
100 90 }
  91 + self.navigationController!.popViewController(animated: true)
101 92 AppDelegate.instance().window?.makeToast("修改成功")
102 93 }, failHandler: { (error) in
103 94 self.view.makeToast("修改失败")
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/User.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">
  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">
3 3 <device id="retina4_7" orientation="portrait">
4 4 <adaptation id="fullscreen"/>
5 5 </device>
... ... @@ -523,16 +523,9 @@
523 523 <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/>
524 524 </connections>
525 525 </view>
526   - <navigationItem key="navigationItem" title="忘记密码" id="kn3-BP-XrH">
527   - <barButtonItem key="rightBarButtonItem" title="取消" id="Qjp-nS-fi2">
528   - <connections>
529   - <action selector="cancleAction:" destination="HIn-e8-Pzh" id="TkS-G8-Iyw"/>
530   - </connections>
531   - </barButtonItem>
532   - </navigationItem>
  526 + <navigationItem key="navigationItem" title="忘记密码" id="kn3-BP-XrH"/>
533 527 <connections>
534 528 <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/>
535   - <outlet property="cancleItem" destination="Qjp-nS-fi2" id="gIx-W1-0Kq"/>
536 529 <outlet property="contentSizeHeight" destination="lat-Tj-mho" id="3Ro-l4-uWu"/>
537 530 <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/>
538 531 <outlet property="phoneViewHeight" destination="xsq-cP-2jd" id="yza-R9-2EJ"/>
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard
... ... @@ -730,13 +730,7 @@
730 730 <outletCollection property="gestureRecognizers" destination="ZEf-mm-u9e" appends="YES" id="Gmm-Kb-eQb"/>
731 731 </connections>
732 732 </view>
733   - <navigationItem key="navigationItem" title="注册" id="VWP-v7-Qoc">
734   - <barButtonItem key="rightBarButtonItem" title="取消" id="Okk-g0-Rwk">
735   - <connections>
736   - <action selector="cancleAction:" destination="tCx-JF-YJm" id="ypG-ks-rG6"/>
737   - </connections>
738   - </barButtonItem>
739   - </navigationItem>
  733 + <navigationItem key="navigationItem" title="注册" id="VWP-v7-Qoc"/>
740 734 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
741 735 <size key="freeformSize" width="375" height="667"/>
742 736 <connections>
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/RegisterViewController.swift
... ... @@ -95,7 +95,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker
95 95 if error==nil {
96 96 if JSON.fromString(jsonString: str)!["status"].intValue == 1{
97 97 httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
98   - self.navigationController!.dismiss(animated: true, completion: nil)
  98 + self.navigationController!.popViewController(animated: true)
99 99 AppDelegate.instance().window?.makeToast("注册成功")
100 100 NotificationCenter.default.post(name: NSNotification.Name(rawValue: "refreshLoginUser"), object: self.phoneNumber.text!)
101 101 //是否登录
... ... @@ -116,10 +116,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker
116 116  
117 117  
118 118 @IBAction func loginBtnClickAction(_ sender: AnyObject) {
119   - self.navigationController!.dismiss(animated: true, completion: nil)
120   - }
121   - @IBAction func cancleAction(_ sender: UIBarButtonItem) {
122   - self.navigationController!.dismiss(animated: true, completion: nil)
  119 + self.navigationController!.popViewController(animated: true)
123 120 }
124 121  
125 122 @IBAction func nickNameSetTapAction(_ sender: AnyObject) {
... ...