Skip to content

Commit 2ab238b

Browse files
author
Athul Sai
committed
Updated readme file, pod spec and added screenshots.
1 parent c6f6778 commit 2ab238b

5 files changed

Lines changed: 39 additions & 5 deletions

File tree

Example/KWVerificationCodeView.gif

276 KB
Loading

Example/interfacebuilder.png

101 KB
Loading

Example/screenshot.png

41.3 KB
Loading

KWVerificationCodeView.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = 'KWVerificationCodeView'
33
s.version = '0.1.0'
4-
s.summary = 'A subclass on UIView that displays a verification code field.'
5-
s.description = 'This CocoaPod provides the ability to use a UIView that can display a verification field.'
6-
s.homepage = 'https://bitbucket.org/keepworks/kwverificationcodeview'
4+
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.'
6+
s.homepage = 'https://github.com/keepworks/kwverificationcodeview'
77
s.license = { :type => 'MIT', :file => 'LICENSE' }
88
s.author = { 'KeepWorks' => 'ios@keepworks.com' }
9-
s.source = { :git => 'https://bitbucket.org/keepworks/kwverificationcodeview.git', :tag => s.version.to_s }
9+
s.source = { :git => 'https://github.com/keepworks/kwverificationcodeview.git', :tag => s.version.to_s }
1010

1111
s.ios.deployment_target = '8.0'
1212
s.source_files = 'KWVerificationCodeView/Classes/**/*'

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
# KWVerificationCodeView
1+
KWVerificationCodeView
2+
==================
23

34
[![CI Status](http://img.shields.io/travis/Athul Sai/KWVerificationCodeView.svg?style=flat)](https://travis-ci.org/Athul Sai/KWVerificationCodeView)
45
[![Version](https://img.shields.io/cocoapods/v/KWVerificationCodeView.svg?style=flat)](http://cocoapods.org/pods/KWVerificationCodeView)
56
[![License](https://img.shields.io/cocoapods/l/KWVerificationCodeView.svg?style=flat)](http://cocoapods.org/pods/KWVerificationCodeView)
67
[![Platform](https://img.shields.io/cocoapods/p/KWVerificationCodeView.svg?style=flat)](http://cocoapods.org/pods/KWVerificationCodeView)
78

9+
A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.
10+
11+
![Screenshot](Example/KWVerificationCodeView.gif)
12+
813
## Example
914

1015
To run the example project, clone the repo, and run `pod install` from the Example directory first.
1116

1217
## Requirements
18+
- iOS 8 or later
19+
- Swift 3.0
1320

1421
## Installation
1522

@@ -19,11 +26,38 @@ it, simply add the following line to your Podfile:
1926
```ruby
2027
pod "KWVerificationCodeView"
2128
```
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:
32+
33+
![Interface Builder Screenshot](Example/interfacebuilder.png)
34+
35+
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.
2246

2347
## Author
2448

2549
KeepWorks, ios@keepworks.com
2650

51+
## Credits
52+
53+
KWVerificationCodeView is owned and maintained by [KeepWorks](http://www.keepworks.com/).
54+
55+
[![N|Solid](http://www.keepworks.com/assets/logo-800bbf55fabb3427537cf669dc8cd018.png)](http://www.keepworks.com/)
56+
57+
## Contributing
58+
59+
Bug reports and pull requests are welcome on GitHub at https://github.com/keepworks/KWVerificationCodeView.
60+
2761
## License
2862

2963
KWVerificationCodeView is available under the MIT license. See the LICENSE file for more info.

0 commit comments

Comments
 (0)