Skip to content

Commit 7ade4db

Browse files
committed
Add clear functionality in example
1 parent 849ca3a commit 7ade4db

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

Example/KWVerificationCodeView/Base.lproj/Main.storyboard

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,22 @@
7676
<segue destination="ViW-Wf-OWW" kind="presentation" id="PCu-5s-Oao"/>
7777
</connections>
7878
</button>
79+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XUw-3U-0Yz">
80+
<rect key="frame" x="266" y="362" width="34" height="30"/>
81+
<state key="normal" title="clear"/>
82+
<connections>
83+
<action selector="clearButtonTapped:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="h1q-Ts-lAH"/>
84+
</connections>
85+
</button>
7986
</subviews>
8087
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
8188
<constraints>
8289
<constraint firstItem="z9m-CU-XT6" firstAttribute="top" secondItem="Skh-28-8br" secondAttribute="bottom" constant="50" id="3ER-Pd-VZR"/>
8390
<constraint firstItem="ekS-Ew-GpT" firstAttribute="top" secondItem="P6k-pN-VEP" secondAttribute="bottom" constant="22" id="H7u-LC-n82"/>
8491
<constraint firstItem="ekS-Ew-GpT" firstAttribute="top" secondItem="6e0-Am-MUv" secondAttribute="bottom" constant="90" id="HQQ-Ne-ux5"/>
8592
<constraint firstItem="6e0-Am-MUv" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" constant="16" id="K9Y-GQ-xFr"/>
93+
<constraint firstItem="XUw-3U-0Yz" firstAttribute="centerY" secondItem="Skh-28-8br" secondAttribute="centerY" id="Lmb-6J-uxd"/>
94+
<constraint firstItem="XUw-3U-0Yz" firstAttribute="leading" secondItem="Skh-28-8br" secondAttribute="trailing" constant="33.5" id="Lvp-ZH-Nu3"/>
8695
<constraint firstAttribute="trailing" secondItem="6e0-Am-MUv" secondAttribute="trailing" constant="16" id="NnO-Pl-xaO"/>
8796
<constraint firstItem="Skh-28-8br" firstAttribute="top" secondItem="ekS-Ew-GpT" secondAttribute="bottom" constant="22" id="UAT-si-Rcy"/>
8897
<constraint firstItem="Skh-28-8br" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="bUo-66-X5C"/>

Example/KWVerificationCodeView/VerificationCodeViewController.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ class VerificationCodeViewController: UIViewController {
2323
verificationCodeView.delegate = self
2424

2525
/* Other available options
26-
2726
verificationCodeView.keyboardType = UIKeyboardType.emailAddress
28-
2927
*/
3028
}
3129

@@ -38,6 +36,10 @@ class VerificationCodeViewController: UIViewController {
3836
present(alertController, animated: true, completion: nil)
3937
}
4038
}
39+
40+
@IBAction func clearButtonTapped(_ sender: UIButton) {
41+
verificationCodeView.clear()
42+
}
4143
}
4244

4345
// MARK: - KWVerificationCodeViewDelegate

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- KWVerificationCodeView (0.1.7)
2+
- KWVerificationCodeView (0.1.9)
33

44
DEPENDENCIES:
55
- KWVerificationCodeView (from `../`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99
:path: ../
1010

1111
SPEC CHECKSUMS:
12-
KWVerificationCodeView: 291b6b9c82451eef4686a4f409a315a76da74cbc
12+
KWVerificationCodeView: efa0f7833c2d291f166553c36e592048bfb667da
1313

1414
PODFILE CHECKSUM: c5456285278196ae1d72df7acbfd1db2fab11376
1515

0 commit comments

Comments
 (0)