[+] Automatically change the family id input to number pad
This commit is contained in:
@@ -314,6 +314,7 @@ class FamilyCreateJoinVC: UIViewController
|
|||||||
// Set UI according to createMode
|
// Set UI according to createMode
|
||||||
lFamilyNameOrId.text = createMode ? "Family Name" : "Family ID"
|
lFamilyNameOrId.text = createMode ? "Family Name" : "Family ID"
|
||||||
bCreateJoin.setTitle(createMode ? "Create" : "Join", for: .normal)
|
bCreateJoin.setTitle(createMode ? "Create" : "Join", for: .normal)
|
||||||
|
tNameOrId.keyboardType = createMode ? .default : .numberPad
|
||||||
|
|
||||||
// Default name
|
// Default name
|
||||||
if createMode
|
if createMode
|
||||||
|
|||||||
@@ -1032,7 +1032,7 @@
|
|||||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UGD-ka-LPo">
|
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UGD-ka-LPo">
|
||||||
<rect key="frame" x="120" y="0.0" width="254" height="34"/>
|
<rect key="frame" x="120" y="0.0" width="254" height="34"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||||
<textInputTraits key="textInputTraits" secureTextEntry="YES" textContentType="one-time-code"/>
|
<textInputTraits key="textInputTraits" keyboardType="numberPad" secureTextEntry="YES" textContentType="one-time-code"/>
|
||||||
</textField>
|
</textField>
|
||||||
</subviews>
|
</subviews>
|
||||||
</stackView>
|
</stackView>
|
||||||
@@ -1128,7 +1128,7 @@
|
|||||||
<constraint firstAttribute="trailing" secondItem="vpv-oC-dfU" secondAttribute="trailing" id="oPm-FV-t2A"/>
|
<constraint firstAttribute="trailing" secondItem="vpv-oC-dfU" secondAttribute="trailing" id="oPm-FV-t2A"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yB2-sF-tqs">
|
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yB2-sF-tqs">
|
||||||
<rect key="frame" x="20" y="75" width="374" height="107.5"/>
|
<rect key="frame" x="20" y="75" width="374" height="107.5"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Afe-5l-IkF">
|
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Afe-5l-IkF">
|
||||||
@@ -1189,11 +1189,6 @@
|
|||||||
<constraint firstItem="yB2-sF-tqs" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="rMF-jX-a4l"/>
|
<constraint firstItem="yB2-sF-tqs" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="rMF-jX-a4l"/>
|
||||||
<constraint firstItem="4JV-r6-luC" firstAttribute="top" secondItem="4kN-8K-gM9" secondAttribute="bottom" id="xRb-1q-Gad"/>
|
<constraint firstItem="4JV-r6-luC" firstAttribute="top" secondItem="4kN-8K-gM9" secondAttribute="bottom" id="xRb-1q-Gad"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<variation key="default">
|
|
||||||
<mask key="subviews">
|
|
||||||
<exclude reference="yB2-sF-tqs"/>
|
|
||||||
</mask>
|
|
||||||
</variation>
|
|
||||||
</view>
|
</view>
|
||||||
<navigationItem key="navigationItem" id="6by-4V-XuW"/>
|
<navigationItem key="navigationItem" id="6by-4V-XuW"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
Reference in New Issue
Block a user