All Projects → Datt1994 → DPOTPView

Datt1994 / DPOTPView

Licence: Apache-2.0 license
Customisable OTP view and Passcode view

Programming Languages

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

Projects that are alternatives of or similar to DPOTPView

KWVerificationCodeView
A customisable verification code view to capture OTPs
Stars: ✭ 83 (+59.62%)
Mutual labels:  otp, verification, otpauth, verification-code
passwordless
Passwordless authentication server, supports OTP, WebAuthn, plan to implement TOTP and mobile biometric authentication
Stars: ✭ 34 (-34.62%)
Mutual labels:  otp, otpauth, otp-verification
otp-authenticator-webapp
A 'Google Authenticator' like Single Page Application
Stars: ✭ 69 (+32.69%)
Mutual labels:  otp, otpauth
react-native-sms-user-consent
React Native wrapper for Android's SMS User Consent API, ready to use in React Native apps with minimum effort.
Stars: ✭ 45 (-13.46%)
Mutual labels:  otp, verification
OneTime
iOS, watchOS, & macOS One-Time Password client
Stars: ✭ 14 (-73.08%)
Mutual labels:  otp, otp-applications
SPPinView
SPPinView extensively use for pin view or passcode view or OTP view
Stars: ✭ 20 (-61.54%)
Mutual labels:  passcode, passcodeview
SwiftyCodeView
Fully customizable UI Component for verification codes written in swift with RxSwift support!
Stars: ✭ 86 (+65.38%)
Mutual labels:  verification, pin
HcdSpecialField
A special field like mobike input bike number field.仿摩拜单车手动输入单车编号控件.
Stars: ✭ 53 (+1.92%)
Mutual labels:  passcode, passcode-viewcontroller
extract otp secret keys
Extract two-factor authentication (2FA, TFA) secret keys from export QR codes of "Google Authenticator" app
Stars: ✭ 217 (+317.31%)
Mutual labels:  otp, otpauth
Concuerror
Concuerror is a stateless model checking tool for Erlang programs.
Stars: ✭ 277 (+432.69%)
Mutual labels:  otp, verification
Flutter pinput
🔥🚀 Flutter package to create Pin code input text field with every pixel customization possibility 🎨 with beautiful animations
Stars: ✭ 157 (+201.92%)
Mutual labels:  otp, verification
PassCodeText
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.
Stars: ✭ 105 (+101.92%)
Mutual labels:  otp, passcode
verify
Laravel package to verify users with a one-time password (OTP)
Stars: ✭ 25 (-51.92%)
Mutual labels:  otp, otp-verification
laravel-otp-login
Adds a customizable, translatable, configurable OTP verification step to Laravel Auth. You can add your own SMS provider too.
Stars: ✭ 16 (-69.23%)
Mutual labels:  otp, verification
one-wallet
1wallet - unconventional keyless, non-custodial wallet secured by Google Authenticator. EVM-compatible, smart contract operated, with composable security.
Stars: ✭ 85 (+63.46%)
Mutual labels:  otp, otpauth
hagelslag
Hagelslag is an object-based severe storm hazard forecasting system.
Stars: ✭ 58 (+11.54%)
Mutual labels:  verification
totp
Time-Based One-Time Password Code Generator
Stars: ✭ 76 (+46.15%)
Mutual labels:  passcode
otpauth-rs
Two-step verification of HOTP/TOTP for Rust.
Stars: ✭ 27 (-48.08%)
Mutual labels:  otpauth
pigame
Just a game server template for Erlang/OTP.
Stars: ✭ 25 (-51.92%)
Mutual labels:  otp
kronos
Management of arithmetic operations on dates
Stars: ✭ 23 (-55.77%)
Mutual labels:  otp

DPOTPView

Platform Language: Swift 5 License Version Carthage compatible

Look

Customisable OTP view and Passcode view

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C & Swift. You can install it with the following command:

$ gem install cocoapods

Podfile

To integrate DPOTPView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

target 'TargetName' do
use_frameworks!
pod 'DPOTPView'
end

Then, run the following command:

$ pod install

Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate DPOTPView into your Xcode project using Carthage, specify it in your Cartfile:

github "Datt1994/DPOTPView"

Run carthage to build the framework and drag the framework (DPOTPView.framework) into your Xcode project.

Note: IBDesignables and IBInspectables will not work in interface builder.

Workaround: Create IBDesignable subclass of DPOTPView, Use this subclass as custom calss in interface builder.

@IBDesignable
class OTPView : DPOTPView {}    

Installation with Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

To add the library as package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL https://github.com/Datt1994/DPOTPView.git

Add Manually

Download Project and copy-paste DPOTPView.swift file into your project

How to use

AddClass

👆Add DPOTPView to UIView Custom Class.

Properties

👆Use this properties as per your requirments.

Code

Set up through code

let txtOTPView = DPOTPView(frame: CGRect(x: (self.view.frame.width - 250)/2, y: txtDPOTPView.frame.origin.y + 50, width: 250, height: 60))
txtOTPView.count = 5
txtOTPView.spacing = 10
txtOTPView.fontTextField = UIFont(name: "HelveticaNeue-Bold", size: CGFloat(25.0))!
txtOTPView.dismissOnLastEntry = true
txtOTPView.borderColorTextField = .black
txtOTPView.selectedBorderColorTextField = .blue
txtOTPView.borderWidthTextField = 2
txtOTPView.backGroundColorTextField = .lightGray
txtOTPView.cornerRadiusTextField = 8
txtOTPView.isCursorHidden = true
//txtOTPView.isSecureTextEntry = true
//txtOTPView.isBottomLineTextField = true
//txtOTPView.isCircleTextField = true
view.addSubview(txtOTPView)

Usage

txtDPOTPView.text = "1234" // set text
print(txtDPOTPView.text ?? "") // get text
txtDPOTPView.validate() // validate all text entry
_ = txtDPOTPView.becomeFirstResponder()

Delegate Methods

extension ViewController : DPOTPViewDelegate {
   func dpOTPViewAddText(_ text: String, at position: Int) {
        print("addText:- " + text + " at:- \(position)" )
    }
    
    func dpOTPViewRemoveText(_ text: String, at position: Int) {
        print("removeText:- " + text + " at:- \(position)" )
    }
    
    func dpOTPViewChangePositionAt(_ position: Int) {
        print("at:-\(position)")
    }
    func dpOTPViewBecomeFirstResponder() {
        
    }
    func dpOTPViewResignFirstResponder() {
        
    }
}
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].