Skip to content

NerdzPinView is a highly customisable library used for entering pin and one time codes.

License

Notifications You must be signed in to change notification settings

RomanKovalchukDev/NerdzPinView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NerdzPinView

NerdzPinView is a highly customisable library used for entering pin and one time codes.

Swift 5.9 SPM Compatible Platforms iOS License MIT

Getting Started

NerdzPinView library supports both UIKIt and SwiftUI frameworks.

Installation

Swift Package Manager

To add NerdzPinView to a Swift Package Manager based project add it using Xcode add package command or add it as a dependency inside your Package.swift file: .package(url: "https://github.com/RomanKovalchukDev/NerdzPinView")

Manual

Clone the repo and drag files from NerdzPinView/Sources folder into your Xcode project.

Usage

SwiftUI

NerdzPinView library provides complete SwiftUI wrapper over custom UIKeyInput component. To use it inside your SwiftUI application just add NerdzBorderedPinView or NerdzUnderlinePinView inside your view body. SwiftUI views have text, viewState, and isFocused binding properties alongside UIKeyInput properties that are passed to the wrapped view.

You could take a look into the usage of the library inside SwiftUI project using SwiftUI demo project.

UIKit

To use the library from the xib files or storyboards you should use DesignableBorderedPinInputView or DesignableUnderlinedPinInputView - this two classes are predefined views that are wrapers around generic PinCodeInputView.

You could also use generic PinCodeInputView programatically. This use case mostly needed for you to provide your own item display view.

You could take a look into the usage of the library inside SwiftUI project using SwiftUI demo project.

Requirements

  • iOS 16.0 +
  • Xcode 16.0 +

License

NerdzPinView is available under the MIT license. See LICENSE for details.

About

NerdzPinView is a highly customisable library used for entering pin and one time codes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages