Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Sunspension/VKPinCodeView
VKPinCodeView is simple and elegant UI component for input PIN. You can easily customise appearance and get auto fill (OTP) iOS 12 feature right from the box.
https://github.com/Sunspension/VKPinCodeView
Last synced: 10 days ago
JSON representation
VKPinCodeView is simple and elegant UI component for input PIN. You can easily customise appearance and get auto fill (OTP) iOS 12 feature right from the box.
- Host: GitHub
- URL: https://github.com/Sunspension/VKPinCodeView
- Owner: Sunspension
- License: mit
- Created: 2019-02-21T23:10:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T20:27:20.000Z (almost 4 years ago)
- Last Synced: 2024-10-03T03:45:18.716Z (about 1 month ago)
- Language: Swift
- Homepage:
- Size: 4.91 MB
- Stars: 96
- Watchers: 4
- Forks: 25
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-swift - VKPinCodeView - Simple and elegant UI component for input PIN. (Libs / UI)
- awesome-swift - VKPinCodeView - Simple and elegant UI component for input PIN. (Libs / UI)
- awesome-swift - VKPinCodeView - VKPinCodeView is simple and elegant UI component for input PIN. You can easily customise appearance and get auto fill (OTP) iOS 12 feature right from the box. ` 📝 10 months ago` (UI [🔝](#readme))
- awesome-swift - VKPinCodeView - Simple and elegant UI component for input PIN. (Libs / UI)
README
[![Build Status](https://travis-ci.org/Sunspension/VKPinCodeView.svg?branch=master)](https://travis-ci.com/Sunspension/VKPinCodeView)
![(Swift Version)](https://img.shields.io/badge/swift-5.1-orange)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/VKPinCodeView.svg)](https://img.shields.io/cocoapods/v/VKPinCodeView.svg)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen)](https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html)## Features
- [x] Variable PIN length
- [x] Underline, border and custom styles
- [x] The error status with / without shake animation
- [x] Resetting the error status manually, by user interaction or automatically with a custom delay
- [x] Highlighting the selected entry with / without animation
- [x] Text input callbacks (begin editing, change code, complete)
- [x] Text input validation
- [x] LTR/RTL support## Preview
![](pincode.gif)
## Installation
### CocoaPods
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate `VKPinCodeView` into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
pod 'VKPinCodeView'
```### Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate `VKPinCodeView` into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "Sunspension/VKPinCodeView"
```### Manually
Just copy and paste Source folder into your project.
## Minimal Setup
```swift
override func viewDidLoad() {
super.viewDidLoad()
let pinView = VKPinCodeView()
pinView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(pinView)
pinView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 40).isActive = true
pinView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -40).isActive = true
pinView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
pinView.heightAnchor.constraint(equalToConstant: 50).isActive = true
pinView.onSettingStyle = { UnderlineStyle() }
pinView.becomeFirstResponder()
}
```## Contribute
VKPinCodeView is open to contribute, see contribution notes.
- If you want to contribute, submit a pull request
- If you found a bug, open an issue.
- If you need help with a feature or need to disscuss something else please contact me [email protected]## Requirements
- iOS 9.0+
- Xcode 10.2+
- Swift 5.0## Author
Made with :heart: by Vladimir Kokhanevich
## License
VKPinCodeView is released under the MIT license. [See LICENSE](https://github.com/Sunspension/VKPinCodeView/blob/master/LICENSE) for details.