Awesome
<img src="Assets/SSOTPPinView.png" alt="SSOTPPinView">SSOTPPinView
SSOTPPinView is a comprehensive library for iOS projects, designed to streamline the creation and customization of OTP (One Time Password) input views. With support for custom keyboards, extensive OTP view customization, and seamless integration with SwiftUI, SSOTPPinView provides a complete solution for secure and user-friendly OTP entry.
Screenshots
Box | Circle | Underline |
---|---|---|
<img width=260px src="https://github.com/SimformSolutionsPvtLtd/SSOTPPinView/blob/master/Assets/Box.gif" /> | <img width=260px src="https://github.com/SimformSolutionsPvtLtd/SSOTPPinView/blob/master/Assets/Circle.gif" /> | <img width=260px src="https://github.com/SimformSolutionsPvtLtd/SSOTPPinView/blob/master/Assets/Underline.gif" /> |
Features!
- Enhance user experience with a tailored keyboard designed for efficient and secure OTP input, or use the default iOS keyboards.
- Implement OTP input fields that are both functional and aesthetically pleasing.
- Personalize the appearance and behavior of the OTP view to match your app's unique style.
- Easily integrate SSOTPPinView into your SwiftUI projects for modern and responsive user interfaces.
Requirements
- iOS 16+
- Xcode 14+
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
Navigate to project root folder to integrate pod.
$ pod init
It will generate Podfile
for your project. To integrate SSOTPPinView into your project specify it in your Podfile
:
platform :ios, '16.0'
use_frameworks!
target '<Your Target Name>' do
pod 'SSOTPPinView'
end
Then, run the following command:
$ pod install
It will generate <Project>.xcworkspace
file. From now on you should open the project using this file.
Swift Package Manager
You can install SSOTPPinView
using Swift Package Manager by:
- Go to
Xcode
->File
->Add Package Dependencies...
- Add package URL https://cocoapods.org/pods/SSOTPPinView
dependencies: [
.package(url: "https://github.com/SimformSolutionsPvtLtd/SSOTPPinView.git", from: "1.0.1")
]
Manually
- Add SSOTPPinView folder from /Source folder to your project.
Usage
import SSOTPPinView
SSOTPPinView(textFieldType: .underline, numberOfCount: 5, keyboardOptions: .customRandomDigits) { newValue in
self.otp = newValue
}
.isSecureTextEntry(true)
.secureTextType(.dot)
.textColor(.red)
.fontWeight(.bold)
.lineColor(.red)
.lineWidth(2)
// custom keyboard property
.keyboardBackgroundColor(.white)
.keyFontColor(.red)
.keyStrokeColor(.blue)
🤝 How to Contribute
Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:
Check out our Contributing Guide for ideas on contributing.
Bugs and Feedback
For bugs, feature requests, and discussion use GitHub Issues.
Documentation
Documentation - Find the full API reference for more detailed documentation.
Find this samples useful? :heart:
Support it by joining stargazers :star: for this repository.
Check out our other Libraries
<h3><a href="https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries"><u>🗂 Simform Solutions Libraries→</u></a></h3>MIT License
This project is licensed under the MIT License - see the LICENSE file for details