Commit 900acef13065a417f18cd072df291a1728ed05b0

Authored by Cao yang
1 parent 2f4fbc0b
Exists in parentassistant

优化登录页面键盘输入

ParentAssistant/ParentAssistant.xcodeproj/xcuserdata/caoyang.xcuserdatad/xcschemes/xcschememanagement.plist
... ... @@ -7,7 +7,7 @@
7 7 <key>ParentAssistant.xcscheme</key>
8 8 <dict>
9 9 <key>orderHint</key>
10   - <integer>1</integer>
  10 + <integer>0</integer>
11 11 </dict>
12 12 </dict>
13 13 </dict>
... ...
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/LoginViewController.swift
... ... @@ -8,31 +8,49 @@
8 8  
9 9 import UIKit
10 10 //登录
11   -class LoginViewController: UIViewController,UITextFieldDelegate {
12   - @IBOutlet var topView: NSLayoutConstraint!
  11 +class LoginViewController: UIViewController,UITextFieldDelegate,UIScrollViewDelegate {
  12 +
  13 + @IBOutlet weak var scrollView: UIScrollView!
13 14 @IBOutlet var iconImageView: UIImageView!//系统头像
14 15 @IBOutlet var phoneTextField: UITextField!//电话号码
15 16 @IBOutlet var passwordTextField: UITextField!//密码
16 17 @IBOutlet var passwordHiddenBtn: UIButton!//查看密码按钮
17 18 @IBOutlet var loginBtn: UIButton!
  19 +
  20 + var keyShow = Bool()
18 21 override func viewDidLoad() {
19 22 super.viewDidLoad()
  23 +
  24 + self.scrollView.contentSize = CGSize.init(width: 0, height: screenHeight)
  25 +
20 26 layoutSubViews()
21   -
  27 +
  28 + self.phoneTextField.addTarget(self, action: #selector(textFieldChange), for: UIControlEvents.editingChanged)
  29 + self.passwordTextField.addTarget(self, action: #selector(textFieldChange), for: UIControlEvents.editingChanged)
  30 +
22 31 }
23   - override func loadView() {
24   - super.loadView()
25   - //防止tabbar隐藏导致页面跳一下
26   - self.tabBarController?.tabBar.isHidden = true
27   - self.navigationController?.setNavigationBarHidden(false, animated: true)
  32 +
  33 + func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
  34 +
  35 + phoneTextField.resignFirstResponder()
  36 + passwordTextField.resignFirstResponder()
28 37 }
29   - override func viewWillAppear(_ animated: Bool) {
30   - super.viewWillAppear(animated)
  38 +
  39 + //监听输入长度,显示登录按钮状态
  40 + @objc func textFieldChange(){
  41 + if (phoneTextField.text?.count)!>0 && (passwordTextField.text?.count)!>0 {
  42 + loginBtn.isUserInteractionEnabled = true
  43 + loginBtn.backgroundColor = navigationColor
  44 + }else{
  45 + loginBtn.isUserInteractionEnabled = false
  46 + loginBtn.backgroundColor = UIColor.lightGray
  47 + }
31 48 }
  49 +
32 50 // MARK: - 设置控件属性
33 51 func layoutSubViews(){
34 52 self.navigationItem.title = "登录"
35   - topView.constant = (getScreenHeight()-325)/3
  53 +
36 54 passwordHiddenBtn.setImage(UIImage(named: "my_password_look"), for: UIControlState.selected)
37 55 NotificationCenter.default.addObserver(self, selector: #selector(LoginViewController.keyboardWIllChange(_:)), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
38 56 NotificationCenter.default.addObserver(self, selector: #selector(LoginViewController.getPhoneNumber(_:)), name: NSNotification.Name(rawValue: MyPhoneNumberNotification.getPhoneNumber), object: nil)
... ... @@ -41,10 +59,15 @@ class LoginViewController: UIViewController,UITextFieldDelegate {
41 59 @objc func keyboardWIllChange(_ noti: Notification){
42 60 let userInfo:NSDictionary=noti.userInfo! as NSDictionary
43 61 let endFrame=(userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue
  62 +
44 63 if endFrame?.origin.y == getScreenHeight() {
45   - topView.constant = (getScreenHeight()-325)/3
  64 + UIView.animate(withDuration: 0.5) {
  65 + self.scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: true)
  66 + }
46 67 }else{
47   - topView.constant = (endFrame?.origin.y)!-375
  68 + UIView.animate(withDuration: 0.5) {
  69 + self.scrollView.setContentOffset(CGPoint.init(x: 0, y:80), animated: true)
  70 + }
48 71 }
49 72 }
50 73 @objc func getPhoneNumber(_ noti: Notification){
... ... @@ -58,23 +81,9 @@ class LoginViewController: UIViewController,UITextFieldDelegate {
58 81 passwordHiddenBtn.isSelected = !selected
59 82 passwordTextField.isSecureTextEntry = selected
60 83 }
61   - // MARK: - 设置键盘消失
62   - override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
63   - self.view.endEditing(true)
64   - }
65 84 // MARK: - UITextFieldDelegate
66 85 func textFieldShouldReturn(_ textField: UITextField) -> Bool {
67   - self.view.endEditing(true)
68   - return true
69   - }
70   - func textFieldDidEndEditing(_ textField: UITextField) {
71   - if textField==passwordTextField && phoneTextField.text! != "" && passwordTextField.text! != ""{
72   - loginBtn.isUserInteractionEnabled = true
73   - loginBtn.backgroundColor = UIColorFromRGB(0xC5DAFF)
74   - }else{
75   - loginBtn.isUserInteractionEnabled = false
76   - loginBtn.backgroundColor = UIColor.lightGray
77   - }
  86 + return textField.resignFirstResponder()
78 87 }
79 88 func isMobilePhoneNumber(_ mobile:String)->Bool {
80 89 let str="^1[0-9]{10}"
... ...
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/My.storyboard
... ... @@ -7,6 +7,7 @@
7 7 <deployment identifier="iOS"/>
8 8 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9 9 <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
  10 + <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
10 11 <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
11 12 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
12 13 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
... ... @@ -538,7 +539,7 @@
538 539 </viewController>
539 540 <placeholder placeholderIdentifier="IBFirstResponder" id="9E0-qX-4XP" userLabel="First Responder" sceneMemberID="firstResponder"/>
540 541 </objects>
541   - <point key="canvasLocation" x="150" y="-72"/>
  542 + <point key="canvasLocation" x="954" y="-72"/>
542 543 </scene>
543 544 <!--Login View Controller-->
544 545 <scene sceneID="ohO-Zi-TBy">
... ... @@ -548,14 +549,16 @@
548 549 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
549 550 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
550 551 <subviews>
551   - <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iNa-Xg-qR8">
552   - <rect key="frame" x="0.0" y="148" width="375" height="325"/>
  552 + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x1J-ue-QsP">
  553 + <rect key="frame" x="0.0" y="20" width="375" height="647"/>
553 554 <subviews>
554 555 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defphoto" translatesAutoresizingMaskIntoConstraints="NO" id="MuP-eU-u8t">
555   - <rect key="frame" x="157.5" y="0.0" width="60" height="60"/>
  556 + <rect key="frame" x="157" y="114" width="60" height="60"/>
556 557 <constraints>
557   - <constraint firstAttribute="width" secondItem="MuP-eU-u8t" secondAttribute="height" multiplier="1:1" id="2dS-lO-wew"/>
558   - <constraint firstAttribute="width" constant="60" id="vbp-ai-Bpn"/>
  558 + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="6n8-Tt-z8Q"/>
  559 + <constraint firstAttribute="height" constant="60" id="O0t-sJ-e4W"/>
  560 + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="Pro-uk-uVK"/>
  561 + <constraint firstAttribute="width" constant="60" id="UxO-hd-HqB"/>
559 562 </constraints>
560 563 <userDefinedRuntimeAttributes>
561 564 <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
... ... @@ -564,17 +567,89 @@
564 567 </userDefinedRuntimeAttribute>
565 568 </userDefinedRuntimeAttributes>
566 569 </imageView>
  570 + <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8rh-jr-h8p">
  571 + <rect key="frame" x="8" y="368" width="359" height="40"/>
  572 + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
  573 + <constraints>
  574 + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="gCr-80-H7C"/>
  575 + <constraint firstAttribute="height" constant="40" id="wEQ-N3-d1h"/>
  576 + </constraints>
  577 + <state key="normal" title="登录">
  578 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  579 + </state>
  580 + <userDefinedRuntimeAttributes>
  581 + <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
  582 + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
  583 + <integer key="value" value="5"/>
  584 + </userDefinedRuntimeAttribute>
  585 + </userDefinedRuntimeAttributes>
  586 + <connections>
  587 + <action selector="loginAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="iFr-Mi-Wiq"/>
  588 + <action selector="registerAction:" destination="Uds-ft-2AX" eventType="touchUpInside" id="WOZ-cY-Gu9"/>
  589 + </connections>
  590 + </button>
  591 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X9h-K7-0bg">
  592 + <rect key="frame" x="8" y="419" width="359" height="19"/>
  593 + <subviews>
  594 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="还没有账号,快速" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fRW-Sg-QbI">
  595 + <rect key="frame" x="0.0" y="0.0" width="115" height="20"/>
  596 + <constraints>
  597 + <constraint firstAttribute="width" constant="115" id="Dgm-aw-qIM"/>
  598 + <constraint firstAttribute="height" constant="20" id="ORK-yo-OGM"/>
  599 + </constraints>
  600 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  601 + <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
  602 + <nil key="highlightedColor"/>
  603 + </label>
  604 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fzA-Ya-qRu">
  605 + <rect key="frame" x="114" y="0.0" width="101" height="20"/>
  606 + <constraints>
  607 + <constraint firstAttribute="height" constant="20" id="F9q-1g-471"/>
  608 + <constraint firstAttribute="width" constant="101" id="qIb-br-7HL"/>
  609 + </constraints>
  610 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  611 + <state key="normal" title="注册"/>
  612 + <connections>
  613 + <action selector="registerAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="g4z-aO-EME"/>
  614 + </connections>
  615 + </button>
  616 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bh4-Vg-DUl">
  617 + <rect key="frame" x="215" y="0.0" width="144" height="20"/>
  618 + <constraints>
  619 + <constraint firstAttribute="height" constant="20" id="2bO-CK-qew"/>
  620 + <constraint firstAttribute="width" constant="144" id="gUO-us-cbE"/>
  621 + </constraints>
  622 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  623 + <state key="normal" title="忘记密码"/>
  624 + <connections>
  625 + <action selector="getPasswordAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="EJR-6a-h6E"/>
  626 + <action selector="loginAction:" destination="Uds-ft-2AX" eventType="touchUpInside" id="WkS-hX-ran"/>
  627 + </connections>
  628 + </button>
  629 + </subviews>
  630 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  631 + <constraints>
  632 + <constraint firstItem="fzA-Ya-qRu" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="2Du-1p-xB8"/>
  633 + <constraint firstItem="Bh4-Vg-DUl" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="5js-yF-eZS"/>
  634 + <constraint firstItem="Bh4-Vg-DUl" firstAttribute="leading" secondItem="fzA-Ya-qRu" secondAttribute="trailing" id="9qB-Dc-apn"/>
  635 + <constraint firstAttribute="trailing" secondItem="Bh4-Vg-DUl" secondAttribute="trailing" id="Aaq-mF-JsK"/>
  636 + <constraint firstItem="fRW-Sg-QbI" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="CCF-PJ-FpK"/>
  637 + <constraint firstAttribute="height" constant="19" id="e0a-IV-YHe"/>
  638 + <constraint firstItem="fRW-Sg-QbI" firstAttribute="leading" secondItem="X9h-K7-0bg" secondAttribute="leading" id="qGZ-a2-zCp"/>
  639 + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="19" id="t8g-9K-SwO"/>
  640 + </constraints>
  641 + </view>
567 642 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l2y-yF-IxJ">
568   - <rect key="frame" x="0.0" y="110" width="375" height="80"/>
  643 + <rect key="frame" x="0.0" y="283" width="375" height="80"/>
569 644 <subviews>
570 645 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="zJR-4G-Ym9">
571 646 <rect key="frame" x="8" y="0.0" width="359" height="30"/>
572 647 <constraints>
573   - <constraint firstAttribute="height" constant="30" id="xRq-Ob-tzt"/>
  648 + <constraint firstAttribute="height" constant="30" id="CGb-2G-Jjh"/>
574 649 </constraints>
575 650 <nil key="textColor"/>
576 651 <fontDescription key="fontDescription" type="system" pointSize="14"/>
577   - <textInputTraits key="textInputTraits" returnKeyType="done"/>
  652 + <textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation" returnKeyType="done"/>
578 653 <connections>
579 654 <outlet property="delegate" destination="UG5-bJ-YrY" id="Xho-dZ-Ore"/>
580 655 </connections>
... ... @@ -583,20 +658,20 @@
583 658 <rect key="frame" x="8" y="38" width="359" height="1"/>
584 659 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
585 660 <constraints>
586   - <constraint firstAttribute="height" constant="1" id="yyx-ra-eD2"/>
  661 + <constraint firstAttribute="height" constant="1" id="SxY-RF-Hf1"/>
587 662 </constraints>
588 663 <fontDescription key="fontDescription" type="system" pointSize="17"/>
589 664 <color key="textColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
590 665 <nil key="highlightedColor"/>
591 666 </label>
592 667 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码:6-16个字符" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="IOQ-sk-Ckx">
593   - <rect key="frame" x="8" y="39" width="298" height="30"/>
  668 + <rect key="frame" x="8" y="39" width="324" height="30"/>
594 669 <constraints>
595   - <constraint firstAttribute="height" constant="30" id="Idr-wo-mVx"/>
  670 + <constraint firstAttribute="height" constant="30" id="EzO-Mm-ZgF"/>
596 671 </constraints>
597 672 <nil key="textColor"/>
598 673 <fontDescription key="fontDescription" type="system" pointSize="14"/>
599   - <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/>
  674 + <textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation" returnKeyType="done" secureTextEntry="YES"/>
600 675 <connections>
601 676 <outlet property="delegate" destination="UG5-bJ-YrY" id="qkm-zb-xWD"/>
602 677 </connections>
... ... @@ -605,17 +680,17 @@
605 680 <rect key="frame" x="8" y="77" width="359" height="1"/>
606 681 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
607 682 <constraints>
608   - <constraint firstAttribute="height" constant="1" id="fyR-u3-LBS"/>
  683 + <constraint firstAttribute="height" constant="1" id="eQA-Bw-4Gf"/>
609 684 </constraints>
610 685 <fontDescription key="fontDescription" type="system" pointSize="17"/>
611 686 <nil key="textColor"/>
612 687 <nil key="highlightedColor"/>
613 688 </label>
614 689 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1J2-p5-3X1">
615   - <rect key="frame" x="314" y="47" width="45" height="22"/>
  690 + <rect key="frame" x="340" y="47" width="27" height="22"/>
616 691 <constraints>
617   - <constraint firstAttribute="width" constant="45" id="k3A-rs-8VG"/>
618   - <constraint firstAttribute="height" constant="22" id="sYv-8M-oJG"/>
  692 + <constraint firstAttribute="height" constant="22" id="FkQ-ZM-S8M"/>
  693 + <constraint firstAttribute="width" constant="27" id="Ng4-bN-yGu"/>
619 694 </constraints>
620 695 <state key="normal" image="my_password_unlook">
621 696 <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
... ... @@ -634,112 +709,57 @@
634 709 </subviews>
635 710 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
636 711 <constraints>
637   - <constraint firstItem="zJR-4G-Ym9" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="0Fc-53-ewX"/>
638   - <constraint firstItem="7Rz-tM-Igu" firstAttribute="top" secondItem="IOQ-sk-Ckx" secondAttribute="bottom" constant="8" id="3dr-Qz-eU8"/>
639   - <constraint firstItem="IOQ-sk-Ckx" firstAttribute="top" secondItem="bdq-xk-c7S" secondAttribute="bottom" id="7AX-SR-D42"/>
640   - <constraint firstAttribute="height" constant="80" id="7gx-7J-OKb"/>
641   - <constraint firstItem="7Rz-tM-Igu" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="B9p-mg-Fmu"/>
642   - <constraint firstAttribute="trailing" secondItem="zJR-4G-Ym9" secondAttribute="trailing" constant="8" id="CnL-fF-AU4"/>
643   - <constraint firstItem="zJR-4G-Ym9" firstAttribute="top" secondItem="l2y-yF-IxJ" secondAttribute="top" id="EZB-um-Gtd"/>
644   - <constraint firstItem="1J2-p5-3X1" firstAttribute="leading" secondItem="IOQ-sk-Ckx" secondAttribute="trailing" constant="8" id="FVN-QO-K36"/>
645   - <constraint firstItem="zJR-4G-Ym9" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="NN7-pk-19b"/>
646   - <constraint firstItem="IOQ-sk-Ckx" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="NaB-gb-EBv"/>
647   - <constraint firstItem="bdq-xk-c7S" firstAttribute="top" secondItem="zJR-4G-Ym9" secondAttribute="bottom" constant="8" id="VOj-JI-N5o"/>
648   - <constraint firstItem="zJR-4G-Ym9" firstAttribute="top" secondItem="l2y-yF-IxJ" secondAttribute="top" id="XUn-sp-IXT"/>
649   - <constraint firstItem="1J2-p5-3X1" firstAttribute="top" secondItem="bdq-xk-c7S" secondAttribute="bottom" constant="8" id="YZ9-un-NWs"/>
650   - <constraint firstAttribute="trailing" secondItem="zJR-4G-Ym9" secondAttribute="trailing" constant="8" id="ZaT-Rk-aEG"/>
651   - <constraint firstAttribute="trailing" secondItem="7Rz-tM-Igu" secondAttribute="trailing" constant="8" id="b67-wl-A4g"/>
652   - <constraint firstItem="bdq-xk-c7S" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="trq-Zr-PU8"/>
653   - <constraint firstAttribute="trailing" secondItem="bdq-xk-c7S" secondAttribute="trailing" constant="8" id="ytt-Nr-VyX"/>
654   - <constraint firstAttribute="trailing" secondItem="1J2-p5-3X1" secondAttribute="trailing" constant="16" id="zP0-t8-7QU"/>
655   - </constraints>
656   - </view>
657   - <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8rh-jr-h8p">
658   - <rect key="frame" x="8" y="198" width="359" height="40"/>
659   - <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
660   - <constraints>
661   - <constraint firstAttribute="height" constant="40" id="EUp-oS-yvq"/>
662   - </constraints>
663   - <state key="normal" title="登录">
664   - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
665   - </state>
666   - <userDefinedRuntimeAttributes>
667   - <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
668   - <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
669   - <integer key="value" value="5"/>
670   - </userDefinedRuntimeAttribute>
671   - </userDefinedRuntimeAttributes>
672   - <connections>
673   - <action selector="loginAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="iFr-Mi-Wiq"/>
674   - <action selector="registerAction:" destination="Uds-ft-2AX" eventType="touchUpInside" id="WOZ-cY-Gu9"/>
675   - </connections>
676   - </button>
677   - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X9h-K7-0bg">
678   - <rect key="frame" x="8" y="268" width="359" height="19"/>
679   - <subviews>
680   - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="还没有账号,快速" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fRW-Sg-QbI">
681   - <rect key="frame" x="0.0" y="0.0" width="114.5" height="19"/>
682   - <fontDescription key="fontDescription" type="system" pointSize="14"/>
683   - <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
684   - <nil key="highlightedColor"/>
685   - </label>
686   - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fzA-Ya-qRu">
687   - <rect key="frame" x="114" y="0.0" width="101" height="19"/>
688   - <fontDescription key="fontDescription" type="system" pointSize="14"/>
689   - <state key="normal" title="注册"/>
690   - <connections>
691   - <action selector="registerAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="g4z-aO-EME"/>
692   - </connections>
693   - </button>
694   - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bh4-Vg-DUl">
695   - <rect key="frame" x="215.5" y="0.0" width="143.5" height="19"/>
696   - <fontDescription key="fontDescription" type="system" pointSize="14"/>
697   - <state key="normal" title="忘记密码"/>
698   - <connections>
699   - <action selector="getPasswordAction:" destination="UG5-bJ-YrY" eventType="touchUpInside" id="EJR-6a-h6E"/>
700   - <action selector="loginAction:" destination="Uds-ft-2AX" eventType="touchUpInside" id="WkS-hX-ran"/>
701   - </connections>
702   - </button>
703   - </subviews>
704   - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
705   - <constraints>
706   - <constraint firstItem="fzA-Ya-qRu" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="4vq-I6-cdC"/>
707   - <constraint firstItem="fzA-Ya-qRu" firstAttribute="leading" secondItem="fRW-Sg-QbI" secondAttribute="trailing" id="78A-H5-gJi"/>
708   - <constraint firstAttribute="height" constant="19" id="APE-yl-tYV"/>
709   - <constraint firstItem="Bh4-Vg-DUl" firstAttribute="width" secondItem="X9h-K7-0bg" secondAttribute="width" multiplier="2:5" id="Ifv-nJ-Ors"/>
710   - <constraint firstAttribute="bottom" secondItem="fRW-Sg-QbI" secondAttribute="bottom" id="NlF-ot-xQK"/>
711   - <constraint firstAttribute="bottom" secondItem="Bh4-Vg-DUl" secondAttribute="bottom" id="SAs-6n-FHC"/>
712   - <constraint firstAttribute="trailing" secondItem="Bh4-Vg-DUl" secondAttribute="trailing" id="X6L-Xn-PxI"/>
713   - <constraint firstItem="fRW-Sg-QbI" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="a8O-q0-Fxs"/>
714   - <constraint firstItem="Bh4-Vg-DUl" firstAttribute="top" secondItem="X9h-K7-0bg" secondAttribute="top" id="aV6-G9-T8n"/>
715   - <constraint firstItem="fRW-Sg-QbI" firstAttribute="leading" secondItem="X9h-K7-0bg" secondAttribute="leading" id="huE-rI-PsQ"/>
716   - <constraint firstItem="Bh4-Vg-DUl" firstAttribute="leading" secondItem="fzA-Ya-qRu" secondAttribute="trailing" id="itt-ri-mev"/>
717   - <constraint firstAttribute="bottom" secondItem="fzA-Ya-qRu" secondAttribute="bottom" id="kj1-TR-jJ5"/>
  712 + <constraint firstItem="7Rz-tM-Igu" firstAttribute="top" secondItem="IOQ-sk-Ckx" secondAttribute="bottom" constant="8" id="1O6-mf-8Tg"/>
  713 + <constraint firstAttribute="trailing" secondItem="zJR-4G-Ym9" secondAttribute="trailing" constant="8" id="55S-nW-Yl2"/>
  714 + <constraint firstItem="IOQ-sk-Ckx" firstAttribute="top" secondItem="bdq-xk-c7S" secondAttribute="bottom" id="81n-OM-M8Z"/>
  715 + <constraint firstItem="bdq-xk-c7S" firstAttribute="top" secondItem="zJR-4G-Ym9" secondAttribute="bottom" constant="8" id="H4t-g8-yal"/>
  716 + <constraint firstAttribute="height" constant="80" id="LI0-bW-uhp"/>
  717 + <constraint firstItem="zJR-4G-Ym9" firstAttribute="top" secondItem="l2y-yF-IxJ" secondAttribute="top" id="U38-FX-4cT"/>
  718 + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="80" id="UBK-Wb-rbG"/>
  719 + <constraint firstItem="1J2-p5-3X1" firstAttribute="leading" secondItem="IOQ-sk-Ckx" secondAttribute="trailing" constant="8" id="YG1-Vv-1aV"/>
  720 + <constraint firstAttribute="trailing" secondItem="bdq-xk-c7S" secondAttribute="trailing" constant="8" id="c1t-if-TqW"/>
  721 + <constraint firstItem="7Rz-tM-Igu" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="c6u-fe-cfv"/>
  722 + <constraint firstAttribute="trailing" secondItem="7Rz-tM-Igu" secondAttribute="trailing" constant="8" id="cD9-Az-QD7"/>
  723 + <constraint firstAttribute="trailing" secondItem="1J2-p5-3X1" secondAttribute="trailing" constant="8" id="oSN-G4-x85"/>
  724 + <constraint firstItem="bdq-xk-c7S" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="v9n-R5-DO4"/>
  725 + <constraint firstItem="IOQ-sk-Ckx" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="vZZ-bD-pjG"/>
  726 + <constraint firstItem="zJR-4G-Ym9" firstAttribute="leading" secondItem="l2y-yF-IxJ" secondAttribute="leading" constant="8" id="vyq-KS-9zw"/>
  727 + <constraint firstItem="1J2-p5-3X1" firstAttribute="top" secondItem="bdq-xk-c7S" secondAttribute="bottom" constant="8" id="xfo-vG-x3T"/>
718 728 </constraints>
719 729 </view>
720 730 </subviews>
721   - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
722 731 <constraints>
723   - <constraint firstAttribute="trailing" secondItem="X9h-K7-0bg" secondAttribute="trailing" constant="8" id="22E-n4-Bi5"/>
724   - <constraint firstItem="X9h-K7-0bg" firstAttribute="leading" secondItem="iNa-Xg-qR8" secondAttribute="leading" constant="8" id="35F-mT-dDk"/>
725   - <constraint firstItem="l2y-yF-IxJ" firstAttribute="leading" secondItem="iNa-Xg-qR8" secondAttribute="leading" id="52U-by-P0X"/>
726   - <constraint firstItem="8rh-jr-h8p" firstAttribute="leading" secondItem="iNa-Xg-qR8" secondAttribute="leading" constant="8" id="MaP-ud-Dq3"/>
727   - <constraint firstItem="l2y-yF-IxJ" firstAttribute="top" secondItem="MuP-eU-u8t" secondAttribute="bottom" constant="50" id="Mch-ua-vtc"/>
728   - <constraint firstItem="X9h-K7-0bg" firstAttribute="top" secondItem="8rh-jr-h8p" secondAttribute="bottom" constant="30" id="bPB-QH-jL9"/>
729   - <constraint firstItem="MuP-eU-u8t" firstAttribute="centerX" secondItem="iNa-Xg-qR8" secondAttribute="centerX" id="c4E-D6-ECk"/>
730   - <constraint firstAttribute="trailing" secondItem="l2y-yF-IxJ" secondAttribute="trailing" id="mD4-PT-F33"/>
731   - <constraint firstItem="8rh-jr-h8p" firstAttribute="top" secondItem="l2y-yF-IxJ" secondAttribute="bottom" constant="8" id="nVj-DU-BIW"/>
732   - <constraint firstItem="MuP-eU-u8t" firstAttribute="top" secondItem="iNa-Xg-qR8" secondAttribute="top" id="wgf-Vi-kAc"/>
733   - <constraint firstAttribute="trailing" secondItem="8rh-jr-h8p" secondAttribute="trailing" constant="8" id="xJF-a2-WXZ"/>
734   - <constraint firstAttribute="height" constant="325" id="xfQ-ur-TCe"/>
  732 + <constraint firstAttribute="trailing" secondItem="l2y-yF-IxJ" secondAttribute="trailing" id="21t-IW-Lfw"/>
  733 + <constraint firstItem="8rh-jr-h8p" firstAttribute="leading" secondItem="x1J-ue-QsP" secondAttribute="leading" constant="8" id="2dZ-uU-gs1"/>
  734 + <constraint firstItem="X9h-K7-0bg" firstAttribute="leading" secondItem="x1J-ue-QsP" secondAttribute="leading" constant="8" id="2lr-kL-AY0"/>
  735 + <constraint firstItem="l2y-yF-IxJ" firstAttribute="centerY" secondItem="x1J-ue-QsP" secondAttribute="centerY" id="2vZ-Bp-Gc7"/>
  736 + <constraint firstItem="l2y-yF-IxJ" firstAttribute="centerX" secondItem="8rh-jr-h8p" secondAttribute="centerX" id="356-9l-vO7"/>
  737 + <constraint firstItem="8rh-jr-h8p" firstAttribute="top" secondItem="l2y-yF-IxJ" secondAttribute="bottom" constant="5" id="Fbk-dO-92I"/>
  738 + <constraint firstAttribute="trailing" secondItem="8rh-jr-h8p" secondAttribute="trailing" constant="8" id="Jlh-eI-c8P"/>
  739 + <constraint firstItem="8rh-jr-h8p" firstAttribute="leading" secondItem="X9h-K7-0bg" secondAttribute="leading" id="PZU-xC-RVt"/>
  740 + <constraint firstAttribute="trailing" secondItem="X9h-K7-0bg" secondAttribute="trailing" constant="8" id="UXN-OE-SMD"/>
  741 + <constraint firstItem="X9h-K7-0bg" firstAttribute="top" secondItem="8rh-jr-h8p" secondAttribute="bottom" constant="11" id="V7b-nV-yOk"/>
  742 + <constraint firstItem="MuP-eU-u8t" firstAttribute="centerX" secondItem="x1J-ue-QsP" secondAttribute="centerX" id="Z3p-91-jMU"/>
  743 + <constraint firstItem="MuP-eU-u8t" firstAttribute="top" secondItem="x1J-ue-QsP" secondAttribute="top" constant="114" id="aqN-O5-1qw"/>
  744 + <constraint firstItem="l2y-yF-IxJ" firstAttribute="leading" secondItem="x1J-ue-QsP" secondAttribute="leading" id="asb-us-A3N"/>
  745 + <constraint firstItem="8rh-jr-h8p" firstAttribute="leading" secondItem="x1J-ue-QsP" secondAttribute="leadingMargin" id="awN-N6-199"/>
  746 + <constraint firstAttribute="trailing" secondItem="l2y-yF-IxJ" secondAttribute="trailing" id="ddE-p4-ng1"/>
  747 + <constraint firstAttribute="bottom" secondItem="X9h-K7-0bg" secondAttribute="bottom" constant="195" id="eSi-2B-vUK"/>
  748 + <constraint firstItem="MuP-eU-u8t" firstAttribute="centerX" secondItem="l2y-yF-IxJ" secondAttribute="centerX" id="uPW-1Y-SRK"/>
  749 + <constraint firstItem="l2y-yF-IxJ" firstAttribute="leading" secondItem="x1J-ue-QsP" secondAttribute="leading" id="xaT-zl-a5C"/>
  750 + <constraint firstItem="8rh-jr-h8p" firstAttribute="trailing" secondItem="X9h-K7-0bg" secondAttribute="trailing" id="yrC-8Q-CRp"/>
735 751 </constraints>
736   - </view>
  752 + <connections>
  753 + <outlet property="delegate" destination="UG5-bJ-YrY" id="NO2-hJ-x3b"/>
  754 + </connections>
  755 + </scrollView>
737 756 </subviews>
738 757 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
739 758 <constraints>
740   - <constraint firstItem="iNa-Xg-qR8" firstAttribute="leading" secondItem="Ntj-wl-nEm" secondAttribute="leading" id="QQW-jj-LhX"/>
741   - <constraint firstItem="iNa-Xg-qR8" firstAttribute="trailing" secondItem="Ntj-wl-nEm" secondAttribute="trailing" id="hIx-CF-A1l"/>
742   - <constraint firstItem="iNa-Xg-qR8" firstAttribute="top" secondItem="Ntj-wl-nEm" secondAttribute="top" constant="128" id="ncV-YP-8Ki"/>
  759 + <constraint firstAttribute="trailing" secondItem="x1J-ue-QsP" secondAttribute="trailing" id="5Sn-vu-iz6"/>
  760 + <constraint firstItem="x1J-ue-QsP" firstAttribute="top" secondItem="Ntj-wl-nEm" secondAttribute="top" id="E9K-SV-dEd"/>
  761 + <constraint firstItem="x1J-ue-QsP" firstAttribute="bottom" secondItem="Ntj-wl-nEm" secondAttribute="bottom" id="Gjv-wQ-GxF"/>
  762 + <constraint firstItem="x1J-ue-QsP" firstAttribute="leading" secondItem="fVn-x5-9OR" secondAttribute="leading" id="sq7-lN-Qud"/>
743 763 </constraints>
744 764 <viewLayoutGuide key="safeArea" id="Ntj-wl-nEm"/>
745 765 </view>
... ... @@ -750,12 +770,12 @@
750 770 <outlet property="passwordHiddenBtn" destination="1J2-p5-3X1" id="nRt-UB-PLr"/>
751 771 <outlet property="passwordTextField" destination="IOQ-sk-Ckx" id="WdM-7n-kAj"/>
752 772 <outlet property="phoneTextField" destination="zJR-4G-Ym9" id="9rT-Uj-tRY"/>
753   - <outlet property="topView" destination="ncV-YP-8Ki" id="NYz-Av-YPN"/>
  773 + <outlet property="scrollView" destination="x1J-ue-QsP" id="xCq-vd-IS3"/>
754 774 </connections>
755 775 </viewController>
756 776 <placeholder placeholderIdentifier="IBFirstResponder" id="S0Q-a9-78E" userLabel="First Responder" sceneMemberID="firstResponder"/>
757 777 </objects>
758   - <point key="canvasLocation" x="-570" y="-72"/>
  778 + <point key="canvasLocation" x="-570.39999999999998" y="-72.413793103448285"/>
759 779 </scene>
760 780 <!--个人资料-->
761 781 <scene sceneID="krI-M9-eZ9">
... ... @@ -977,7 +997,7 @@
977 997 </connections>
978 998 </tapGestureRecognizer>
979 999 </objects>
980   - <point key="canvasLocation" x="976.79999999999995" y="-70.614692653673174"/>
  1000 + <point key="canvasLocation" x="1606" y="-72"/>
981 1001 </scene>
982 1002 <!--消息-->
983 1003 <scene sceneID="3fz-6T-ky5">
... ...
ParentAssistant/ParentAssistant/Classes/libs/LZCityPickerClass/LZCityPickerView.m
... ... @@ -66,7 +66,7 @@ static NSInteger const lz_buttonHeight = 30;
66 66 __isShowed = YES;
67 67 [self._superView addSubview:self];
68 68 [UIView animateWithDuration:self.interval animations:^{
69   - self.frame = CGRectMake(0, lz_screenHeight - lz_pickerHeight, lz_screenWidth, lz_pickerHeight);
  69 + self.frame = CGRectMake(0, lz_screenHeight - lz_pickerHeight - 66 - 44, lz_screenWidth, lz_pickerHeight);
70 70 } completion:^(BOOL finished) {
71 71 if (block) {
72 72 block();
... ...
ParentAssistant/Pods/Pods.xcodeproj/xcuserdata/caoyang.xcuserdatad/xcschemes/xcschememanagement.plist
... ... @@ -7,7 +7,7 @@
7 7 <key>Alamofire.xcscheme</key>
8 8 <dict>
9 9 <key>orderHint</key>
10   - <integer>0</integer>
  10 + <integer>1</integer>
11 11 </dict>
12 12 <key>DZNEmptyDataSet.xcscheme</key>
13 13 <dict>
... ...