Skip to content

Commit

Permalink
Add clear functionality in KWVerificationCodeView and update podspec …
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
kpavankotesh committed Jun 30, 2018
1 parent 00e35b3 commit 849ca3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion KWVerificationCodeView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'KWVerificationCodeView'
s.version = '0.1.8'
s.version = '0.1.9'
s.summary = 'A verification code view with validation.'
s.description = 'A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.'
s.homepage = 'https://github.com/keepworks/kwverificationcodeview'
Expand Down
8 changes: 8 additions & 0 deletions KWVerificationCodeView/Classes/KWVerificationCodeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ public protocol KWVerificationCodeViewDelegate: class {
return true
}

public func clear() {
for textFieldView in textFieldViews {
textFieldView.numberTextField.text = ""
}

textFieldViews[0].activate()
}

// MARK: - Private Methods
private func setup() {
loadViewFromNib()
Expand Down

0 comments on commit 849ca3a

Please sign in to comment.