You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s.summary='A verification code view with validation.'
5
+
s.description='A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.'
A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.
10
+
11
+

12
+
8
13
## Example
9
14
10
15
To run the example project, clone the repo, and run `pod install` from the Example directory first.
11
16
12
17
## Requirements
18
+
- iOS 8 or later
19
+
- Swift 3.0
13
20
14
21
## Installation
15
22
@@ -19,11 +26,38 @@ it, simply add the following line to your Podfile:
19
26
```ruby
20
27
pod "KWVerificationCodeView"
21
28
```
29
+
## Usage
30
+
31
+
Add a `UIView` in your *Storyboard* and change the class to `KWVerificationCodeView`. You can set the properties in the *Attributes Inspector* and see a live preview:
It is possile to set the default and selected colors of the underline in the *Storyboard*.
36
+
37
+
### Methods
38
+
39
+
`hasValidCode() -> Bool` - Returns true when the entered code is valid.
40
+
41
+
`getVerificationCode() -> String` - Returns the validation code.
42
+
43
+
### Delegate
44
+
45
+
`KWVerificationCodeViewDelegate` has a method `didChangeVerificationCode()`, which you can implement to check for valid code in real time. This comes handy in stituations where you have to enable the submit button only if the verification code is valid.
22
46
23
47
## Author
24
48
25
49
KeepWorks, ios@keepworks.com
26
50
51
+
## Credits
52
+
53
+
KWVerificationCodeView is owned and maintained by [KeepWorks](http://www.keepworks.com/).
0 commit comments