29

OTP View Master

 4 years ago
source link: https://github.com/Mindinventory/MIOTPVerification
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

OTPViewMaster

A custom verification code view with inbuild validations & Auto fill OTP on keyboard, which can be used for OTP(One time password), verification codes.

ziqY3an.gif

Requirement

  • iOS 12 or later
  • XCode 10.2 or later
  • Swift 5.0

Usage

Add a view in storyboard same as nomal view and assign it to OTPView. After that you can customize the OTPView from storyboard or from code as well. For example let's take a view named as viewOTP and we can customize it as follows.

viewOTP.fieldsCount = 6
    viewOTP.borderWidth = 1
    viewOTP.emptyFieldBorderColor = .green
    viewOTP.isSecureEntry = true
    viewOTP.secureEntrySymbol = .star
    viewOTP.errorBorderColor = .red
    viewOTP.textColor = .red
    viewOTP.cursorColor = .red
    viewOTP.otpFieldDisplayType = .box
    viewOTP.initializeOTPUI()

You can check write OTP is correct or not using delegate methods.

LICENSE!

OTPViewMaster is MIT-licensed .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK