mirror of
https://github.com/wahyd4/libr-ios.git
synced 2026-08-09 05:06:46 +10:00
修复键盘遮挡问题
This commit is contained in:
@@ -1109,7 +1109,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" verticalHuggingPriority="252" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="密码" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="cpu-Tk-fUU">
|
||||
<rect key="frame" x="173" y="318" width="255" height="30"/>
|
||||
<rect key="frame" x="173" y="278" width="255" height="30"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="255" id="e8y-Dj-khI"/>
|
||||
@@ -1118,7 +1118,7 @@
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HB2-uZ-jZA">
|
||||
<rect key="frame" x="173" y="356" width="255" height="32"/>
|
||||
<rect key="frame" x="173" y="316" width="255" height="32"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
@@ -1140,7 +1140,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sWV-hY-NHv">
|
||||
<rect key="frame" x="173" y="396" width="255" height="32"/>
|
||||
<rect key="frame" x="173" y="356" width="255" height="32"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="255" id="OUc-61-eJ9"/>
|
||||
@@ -1165,7 +1165,7 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="邮箱地址" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="LuJ-4O-IoB">
|
||||
<rect key="frame" x="173" y="280" width="255" height="30"/>
|
||||
<rect key="frame" x="173" y="240" width="255" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="255" id="1NX-lg-Z3z"/>
|
||||
<constraint firstAttribute="width" constant="225" id="51z-35-rw6"/>
|
||||
@@ -1244,7 +1244,7 @@
|
||||
<constraint firstItem="cpu-Tk-fUU" firstAttribute="top" secondItem="LuJ-4O-IoB" secondAttribute="bottom" constant="8" symbolic="YES" id="swz-Ro-Jec"/>
|
||||
<constraint firstItem="HB2-uZ-jZA" firstAttribute="top" secondItem="cpu-Tk-fUU" secondAttribute="bottom" constant="8" id="tOF-bv-WXo"/>
|
||||
<constraint firstItem="6ZB-oh-mVA" firstAttribute="leading" secondItem="0Xa-9Y-Cal" secondAttribute="trailing" constant="20" id="vc3-Jj-aMB"/>
|
||||
<constraint firstItem="LuJ-4O-IoB" firstAttribute="top" secondItem="MSA-uv-1uF" secondAttribute="bottom" constant="60" id="wEt-Jr-ClQ"/>
|
||||
<constraint firstItem="LuJ-4O-IoB" firstAttribute="top" secondItem="MSA-uv-1uF" secondAttribute="bottom" constant="20" id="wEt-Jr-ClQ"/>
|
||||
<constraint firstItem="F6i-0U-9Hk" firstAttribute="top" secondItem="0Xa-9Y-Cal" secondAttribute="bottom" constant="20" id="zQr-XX-A88"/>
|
||||
</constraints>
|
||||
<variation key="default">
|
||||
@@ -1256,13 +1256,13 @@
|
||||
<exclude reference="Utj-X3-cBO"/>
|
||||
<exclude reference="bh9-F7-jXr"/>
|
||||
<exclude reference="vc3-Jj-aMB"/>
|
||||
<exclude reference="4TE-KT-zPR"/>
|
||||
<exclude reference="gG2-bE-plR"/>
|
||||
<exclude reference="809-Xh-x1c"/>
|
||||
<exclude reference="ADb-MK-Wgw"/>
|
||||
<exclude reference="MAx-vZ-wjW"/>
|
||||
<exclude reference="Mla-re-Wt1"/>
|
||||
<exclude reference="zQr-XX-A88"/>
|
||||
<exclude reference="4TE-KT-zPR"/>
|
||||
<exclude reference="gG2-bE-plR"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
@@ -1291,7 +1291,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" verticalHuggingPriority="252" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="邮箱地址" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="iIB-9r-imp">
|
||||
<rect key="frame" x="173" y="280" width="255" height="30"/>
|
||||
<rect key="frame" x="173" y="240" width="255" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="255" id="eGm-o4-qD5"/>
|
||||
</constraints>
|
||||
@@ -1299,7 +1299,7 @@
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" verticalHuggingPriority="252" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="密码" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="N24-6p-UIN">
|
||||
<rect key="frame" x="173" y="318" width="255" height="30"/>
|
||||
<rect key="frame" x="173" y="278" width="255" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="255" id="LaL-Xd-xh9"/>
|
||||
</constraints>
|
||||
@@ -1307,7 +1307,7 @@
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jg8-5r-KsY">
|
||||
<rect key="frame" x="173" y="356" width="255" height="32"/>
|
||||
<rect key="frame" x="173" y="316" width="255" height="32"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="255" id="ogc-7k-siZ"/>
|
||||
@@ -1357,7 +1357,7 @@
|
||||
<constraint firstItem="w6U-wb-Wim" firstAttribute="centerX" secondItem="G5V-Dp-TVN" secondAttribute="centerX" id="6nh-6c-6fe"/>
|
||||
<constraint firstItem="Jg8-5r-KsY" firstAttribute="top" secondItem="N24-6p-UIN" secondAttribute="bottom" constant="8" id="7j2-XY-C3p"/>
|
||||
<constraint firstItem="rhX-YU-lEH" firstAttribute="centerX" secondItem="G5V-Dp-TVN" secondAttribute="centerX" id="9Xi-Jl-AZ0"/>
|
||||
<constraint firstItem="iIB-9r-imp" firstAttribute="top" secondItem="w6U-wb-Wim" secondAttribute="bottom" constant="60" id="Nmq-j2-9Ec"/>
|
||||
<constraint firstItem="iIB-9r-imp" firstAttribute="top" secondItem="w6U-wb-Wim" secondAttribute="bottom" constant="20" id="Nmq-j2-9Ec"/>
|
||||
<constraint firstItem="iIB-9r-imp" firstAttribute="centerX" secondItem="G5V-Dp-TVN" secondAttribute="centerX" id="RWa-X8-c11"/>
|
||||
<constraint firstItem="DqC-vn-Xo0" firstAttribute="top" secondItem="rhX-YU-lEH" secondAttribute="bottom" constant="62" id="RxO-bm-zna"/>
|
||||
<constraint firstItem="w6U-wb-Wim" firstAttribute="centerX" secondItem="G5V-Dp-TVN" secondAttribute="centerX" constant="-25" id="SlQ-b3-1hg"/>
|
||||
@@ -1378,7 +1378,6 @@
|
||||
<outlet property="emailTextField" destination="iIB-9r-imp" id="Y6E-tu-8WM"/>
|
||||
<outlet property="passwordTextField" destination="N24-6p-UIN" id="pnS-MJ-Jrm"/>
|
||||
<outlet property="signupButton" destination="Jg8-5r-KsY" id="NUu-RG-vRe"/>
|
||||
<outlet property="usernameTextField" destination="iIB-9r-imp" id="2pL-13-9cP"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="kXj-0k-afy" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
|
||||
@@ -41,6 +41,9 @@ class LoginViewController: UIViewController {
|
||||
self.backupButton.tintColor = UIColor(hexString: "#3FB5A3")
|
||||
self.backupButton.backgroundColor = UIColor(hexString: "#3FB5A3")
|
||||
|
||||
self.emailTextField.delegate = self
|
||||
self.passwordTextField.delegate = self
|
||||
|
||||
}
|
||||
|
||||
override func viewDidAppear(animated: Bool) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import SwiftColors
|
||||
|
||||
class LogupViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var usernameTextField: UITextField!
|
||||
@IBOutlet weak var passwordTextField: UITextField!
|
||||
@IBOutlet weak var signupButton: UIButton!
|
||||
@IBOutlet weak var backButton: UIButton!
|
||||
@@ -40,12 +39,16 @@ class LogupViewController: UIViewController {
|
||||
self.backButton.layer.borderColor=UIColor(hexString: "#3FB5A3")?.CGColor
|
||||
self.backButton.tintColor = UIColor(hexString: "#3FB5A3")
|
||||
self.backButton.backgroundColor = UIColor(hexString: "#3FB5A3")
|
||||
|
||||
self.emailTextField.delegate = self
|
||||
self.passwordTextField.delegate = self
|
||||
|
||||
|
||||
}
|
||||
|
||||
@IBAction func sigupBtnPressed(sender: AnyObject) {
|
||||
|
||||
let username: String = usernameTextField.text!
|
||||
let username: String = emailTextField.text!
|
||||
let password: String = passwordTextField.text!
|
||||
|
||||
print("\(username):\(password)")
|
||||
|
||||
Reference in New Issue
Block a user