SSOTPPinView 1.0.0

SSOTPPinView 1.0.0

Simform Solutions 维护。



  • 作者:
  • Pranay Patel

SSOTPPinView

SSOTPPinView

SSOTPPinView 是一个针对 iOS 项目设计的全面库,用于简化 OTP(一次性密码)输入视图的创建和定制。该库支持自定义键盘、广泛的 OTP 视图定制以及与 SwiftUI 无缝集成,为安全且用户友好的 OTP 输入提供了完整的解决方案。

Swift Version License Carthage Compatible SwiftPM Compatible Version Platform PRs Welcome

屏幕截图

圆形 下划线

功能!

  • 使用为高效和安全 OTP 输入设计的自定义键盘提升用户体验,或使用默认的 iOS 键盘。
  • 实现既功能性强又美观的 OTP 输入字段。
  • 定制 OTP 视图的样式和行为,以匹配您的应用程序的独特风格。
  • 轻松将 SSOTPPinView 集成到您的 SwiftUI 项目中,实现现代且响应式用户界面。

要求

  • iOS 16
  • Xcode 14

安装

CocoaPods

  • 您可以通过在 Podfile 中添加它来使用 CocoaPods 安装 SSOTPPinView

     use_frameworks!
     pod 'SSOTPPinView'
    

Swift 包管理器

  • 当使用 Xcode 11 或更高版本时,您可以通过转到项目设置 > Swift 包来安装 SSOTPPinView,并提供 GitHub URL 以添加仓库。或者,您可以通过转到文件 > Swift 包 > 添加包依赖... 来操作。

       dependencies: [
           .package(url: "https://github.com/SimformSolutionsPvtLtd/SSOTPPinView.git", from: "1.0.0")
       ]
    

手动

  • 将 SSOTPPinView 文件夹从 /Sources 文件夹添加到您的项目中。

用法

import SSOTPPinView

    
SSOTPPinView(textFieldType: .OTP_VIEW_TYPE_BOX, numberOfCount: 5, keyboardOptions: .customRandomDigitsType) { newValue in
                self.otp = newValue
                print(otp)
            }
            .isSecureTextEntry(true)
            .keyFontColor(.blue)
            .keyFontColor(.black)
            .secureTextType(.star)
            .textColor(.red)
            .fontWeight(.bold)
            .lineColor(.red)
            .lineWidth(2)
            .keyboardBackgroundColor(.white)
            .keyFontColor(.red)
            .keyStrokeColor(.blue)
    

🤝 如何贡献

无论您是在帮助我们修复错误、改进文档还是提出功能请求,我们都非常乐意邀请您加入!💪

请查看我们的 贡献指南 了解有关贡献的想法。

觉得这个例子有用? ❤️

如果这个项目对您有帮助,请给它一个 ⭐️!

查看我们的其他库

MIT 许可证

本项目采用 MIT 许可 - 有关详细信息,请参阅 LICENSE 文件。