All Projects → arielpollack → PinCodeView

arielpollack / PinCodeView

Licence: MIT license
No description or website provided.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Labels

Projects that are alternatives of or similar to PinCodeView

flutter sticky and expandable list
粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.
Stars: ✭ 116 (+300%)
Mutual labels:  pin
Pin-ApiTracer
Updated version of ApiTracer Pin tool
Stars: ✭ 19 (-34.48%)
Mutual labels:  pin
Abracadabra
A truly plug 'n' play solution for securing your code.
Stars: ✭ 12 (-58.62%)
Mutual labels:  pin
diy-iidx
Arduino Leonardo code to make a Beatmania controller. Included CAD files for laser cutting materials.
Stars: ✭ 35 (+20.69%)
Mutual labels:  pin
instrumentation
Assorted pintools
Stars: ✭ 24 (-17.24%)
Mutual labels:  pin
SwiftyCodeView
Fully customizable UI Component for verification codes written in swift with RxSwift support!
Stars: ✭ 86 (+196.55%)
Mutual labels:  pin
PCF8575 library
Library to use i2c digital expander with arduino, esp8266 and esp32. Can read write digital value with only 2 wire (perfect for ESP-01).
Stars: ✭ 28 (-3.45%)
Mutual labels:  pin
ActiveLogin.Identity
Parsing and validation of Swedish identities such as Personal Identity Number (svenskt personnummer) in .NET.
Stars: ✭ 51 (+75.86%)
Mutual labels:  pin
pi-gpio-display
Displays the pin status of the gpio pins of the Raspberry Pi zero, 2 and 3
Stars: ✭ 25 (-13.79%)
Mutual labels:  pin
vue-pincode-input
Great pincode input component
Stars: ✭ 128 (+341.38%)
Mutual labels:  pin
peekaboo
An standalone execution trace library built on DynamoRIO.
Stars: ✭ 17 (-41.38%)
Mutual labels:  pin
afl-pin
run AFL with pintool
Stars: ✭ 64 (+120.69%)
Mutual labels:  pin
pinterest-pinner
Programmatically create a pin. Pinterest auto-poster (auto-pinner, autoposter, autopinner, api).
Stars: ✭ 32 (+10.34%)
Mutual labels:  pin
Adsorbent
Adsorbent of RecyclerView , RecyclerView吸顶
Stars: ✭ 25 (-13.79%)
Mutual labels:  pin
react-native-awesome-pin
A highly interactive and customisable PIN code screen for React Native.
Stars: ✭ 28 (-3.45%)
Mutual labels:  pin
DPOTPView
Customisable OTP view and Passcode view
Stars: ✭ 52 (+79.31%)
Mutual labels:  pin
secrets
Simple Secret Sharing Service for social and decentralised management of passwords
Stars: ✭ 30 (+3.45%)
Mutual labels:  pin
vpin
基于 vue 的钉子组件,把你的内容固定到屏幕中📌。
Stars: ✭ 12 (-58.62%)
Mutual labels:  pin

PinCodeView

PinCodeView is a drop-in pin code input field for digits and alpha-numerics.

PinCodeView

Demo

See PinCodeView in action on Appetize.io

Instalation

CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like PinCodeView in your projects.

First, add the following line to your Podfile:

pod 'PinCodeView'

Then, run the following line for integrating it into your project.

pod install

Manually

Clone the repo, and drag the files inside Source/ directory into your project

Usage

You can use PinCodeView from your interface builder or you can add it in code.

In every case, you must provide some data for the view to know how to present.

Add the view itself

let pinView = PinCodeView(numberOfDigits: 6, textType: .numbers, groupingSize: 3, itemSpacing: 7)
pinView.delegate = self
pinView.digitViewInit = PinCodeDigitSquareView.init
self.view.addSubview(pinView)
// set your frame / constraints as you wish

Implement the delegate methods (optional)

 func pinCodeView(_ view: PinCodeView, didSubmitPinCode code: String, isValidCallback callback: @escaping (Bool) -> Void) {
    
    // here you can show your progress or do any UI action

    API.verifyCode(code, completion: { isValid in
        callback(isValid)
    })
 }
    
func pinCodeView(_ view: PinCodeView, didInsertText text: String) {
    // that's the place for hiding error views, etc
}

Customizing!

The view is implemented to allow customization for the single digit views.

So, all you have to to is implement your own view that conform to PinCodeDigitView:

public protocol PinCodeDigitView: class {
    init()
    var digit: String? { get set }
    var state: PinCodeDigitViewState! { get set }
    func configure(withState: PinCodeDigitViewState)
    
    // hackish way to constraint to UIView only
    var view: UIView { get }
}

(note: if you have a better way to make it require the class to be UIView subclass create a pull request plz)

License

PinCodeView is distributed under the terms and conditions of the MIT license.

Credits

PinCodeView is brought to you by Ariel Pollack, and was developed for Dapulse's iOS app.

If you're using PinCodeView in your project, attribution would be very appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].