Skip to content

Commit 849ca3a

Browse files
committed
Add clear functionality in KWVerificationCodeView and update podspec version
1 parent 00e35b3 commit 849ca3a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

KWVerificationCodeView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KWVerificationCodeView'
3-
s.version = '0.1.8'
3+
s.version = '0.1.9'
44
s.summary = 'A verification code view with validation.'
55
s.description = 'A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.'
66
s.homepage = 'https://github.com/keepworks/kwverificationcodeview'

KWVerificationCodeView/Classes/KWVerificationCodeView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ public protocol KWVerificationCodeViewDelegate: class {
167167
return true
168168
}
169169

170+
public func clear() {
171+
for textFieldView in textFieldViews {
172+
textFieldView.numberTextField.text = ""
173+
}
174+
175+
textFieldViews[0].activate()
176+
}
177+
170178
// MARK: - Private Methods
171179
private func setup() {
172180
loadViewFromNib()

0 commit comments

Comments
 (0)