Commit 89c4d4af92dc7cff6bf1b3c1c375b11704b035e3
1 parent
57fd0481
Exists in
newLive
no message
Showing
4 changed files
with
7 additions
and
32 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift
| @@ -22,29 +22,22 @@ class ChangePassWordViewController: UIViewController { | @@ -22,29 +22,22 @@ class ChangePassWordViewController: UIViewController { | ||
| 22 | @IBOutlet weak var agrenPasswordTextFiled: UITextField! | 22 | @IBOutlet weak var agrenPasswordTextFiled: UITextField! |
| 23 | @IBOutlet weak var userCodeTextFiled: UITextField! | 23 | @IBOutlet weak var userCodeTextFiled: UITextField! |
| 24 | 24 | ||
| 25 | - @IBOutlet var cancleItem: UIBarButtonItem! | ||
| 26 | var timer:Timer! | 25 | var timer:Timer! |
| 27 | var scrollViewH:CGFloat = 200 | 26 | var scrollViewH:CGFloat = 200 |
| 28 | var user = AppDelegate.instance().accountManager | 27 | var user = AppDelegate.instance().accountManager |
| 29 | @IBAction func editKeyboard(_ sender: Any) { | 28 | @IBAction func editKeyboard(_ sender: Any) { |
| 30 | self.view.endEditing(true) | 29 | self.view.endEditing(true) |
| 31 | } | 30 | } |
| 32 | - | ||
| 33 | - @IBAction func cancleAction(_ sender: UIBarButtonItem) { | ||
| 34 | - self.dismiss(animated: true, completion: nil) | ||
| 35 | - } | ||
| 36 | override func viewDidLoad() { | 31 | override func viewDidLoad() { |
| 37 | super.viewDidLoad() | 32 | super.viewDidLoad() |
| 38 | if user.isOnline() { | 33 | if user.isOnline() { |
| 39 | self.title="密码修改" | 34 | self.title="密码修改" |
| 40 | - self.navigationItem.rightBarButtonItem=nil | ||
| 41 | phonrView.isHidden=true | 35 | phonrView.isHidden=true |
| 42 | phoneViewHeight.constant=0 | 36 | phoneViewHeight.constant=0 |
| 43 | scrollViewH=150 | 37 | scrollViewH=150 |
| 44 | }else{ | 38 | }else{ |
| 45 | self.configTheme() | 39 | self.configTheme() |
| 46 | self.title="忘记密码" | 40 | self.title="忘记密码" |
| 47 | - self.navigationItem.rightBarButtonItem=cancleItem | ||
| 48 | phonrView.isHidden=false | 41 | phonrView.isHidden=false |
| 49 | phoneViewHeight.constant=50 | 42 | phoneViewHeight.constant=50 |
| 50 | scrollViewH=200 | 43 | scrollViewH=200 |
| @@ -94,10 +87,8 @@ class ChangePassWordViewController: UIViewController { | @@ -94,10 +87,8 @@ class ChangePassWordViewController: UIViewController { | ||
| 94 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | 87 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in |
| 95 | if !self.user.isOnline() { | 88 | if !self.user.isOnline() { |
| 96 | NotificationCenter.default.post(name: NSNotification.Name(rawValue: "refreshLoginUser"), object: phone) | 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 | AppDelegate.instance().window?.makeToast("修改成功") | 92 | AppDelegate.instance().window?.makeToast("修改成功") |
| 102 | }, failHandler: { (error) in | 93 | }, failHandler: { (error) in |
| 103 | self.view.makeToast("修改失败") | 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 | <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> |
| @@ -523,16 +523,9 @@ | @@ -523,16 +523,9 @@ | ||
| 523 | <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/> | 523 | <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/> |
| 524 | </connections> | 524 | </connections> |
| 525 | </view> | 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 | <connections> | 527 | <connections> |
| 534 | <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/> | 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 | <outlet property="contentSizeHeight" destination="lat-Tj-mho" id="3Ro-l4-uWu"/> | 529 | <outlet property="contentSizeHeight" destination="lat-Tj-mho" id="3Ro-l4-uWu"/> |
| 537 | <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/> | 530 | <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/> |
| 538 | <outlet property="phoneViewHeight" destination="xsq-cP-2jd" id="yza-R9-2EJ"/> | 531 | <outlet property="phoneViewHeight" destination="xsq-cP-2jd" id="yza-R9-2EJ"/> |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard
| @@ -730,13 +730,7 @@ | @@ -730,13 +730,7 @@ | ||
| 730 | <outletCollection property="gestureRecognizers" destination="ZEf-mm-u9e" appends="YES" id="Gmm-Kb-eQb"/> | 730 | <outletCollection property="gestureRecognizers" destination="ZEf-mm-u9e" appends="YES" id="Gmm-Kb-eQb"/> |
| 731 | </connections> | 731 | </connections> |
| 732 | </view> | 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 | <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | 734 | <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> |
| 741 | <size key="freeformSize" width="375" height="667"/> | 735 | <size key="freeformSize" width="375" height="667"/> |
| 742 | <connections> | 736 | <connections> |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/RegisterViewController.swift
| @@ -95,7 +95,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker | @@ -95,7 +95,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker | ||
| 95 | if error==nil { | 95 | if error==nil { |
| 96 | if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | 96 | if JSON.fromString(jsonString: str)!["status"].intValue == 1{ |
| 97 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | 97 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in |
| 98 | - self.navigationController!.dismiss(animated: true, completion: nil) | 98 | + self.navigationController!.popViewController(animated: true) |
| 99 | AppDelegate.instance().window?.makeToast("注册成功") | 99 | AppDelegate.instance().window?.makeToast("注册成功") |
| 100 | NotificationCenter.default.post(name: NSNotification.Name(rawValue: "refreshLoginUser"), object: self.phoneNumber.text!) | 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,10 +116,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker | ||
| 116 | 116 | ||
| 117 | 117 | ||
| 118 | @IBAction func loginBtnClickAction(_ sender: AnyObject) { | 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 | @IBAction func nickNameSetTapAction(_ sender: AnyObject) { | 122 | @IBAction func nickNameSetTapAction(_ sender: AnyObject) { |