Latest 1.0.4
Homepage https://github.com/Aymenworks/ASPinCodeField
License MIT
Platforms ios 9.0, requires ARC
Authors

ASPinCodeField is a UI Component that allows you to integrate a pin / digit code UI within your app.

Overview

Appareance

PinCode gif

Behind the scenes

As simple as:
Whimsical ASPinCodeField

🔶 Requirements

  • iOS 9.0+
  • Swift 5.0

👨🏻‍💻 Usage

let pinCodeView = ASPinCodeField()
pinCodeView.delegate = self
pinCodeView.dataSource = self
pinCodeView.borderColor = UIColor.lightGray
pinCodeView.textColor = UIColor.black
pinCodeView.cornerRadius = 4
pinCodeView.itemsSpacing = 8
pinCodeView.textFont = .boldSystemFont(ofSize: 20)

Delegate and DataSource

public protocol ASPinCodeFieldDelegate: class {
    func pinCodeField(_ pinCodeField: ASPinCodeField, didChangeText text: String)
}

public protocol ASPinCodeFieldDataSource: class {
    func numberOfDigits(in pinCodeField: ASPinCodeField) -> Int
    func canPasteFromPasteBoard(_ pinCodeField: ASPinCodeField, pasteboard: String) -> Bool
}

Installation

CocoaPods

pod 'ASPinCodeField'

Carthage

github "Aymenworks/ASPinCodeField"

License

ASPinCodeField is released under the MIT license.

Latest podspec

{
    "name": "ASPinCodeField",
    "version": "1.0.4",
    "summary": "Another PinCode View",
    "description": "Another PinCode View",
    "homepage": "https://github.com/Aymenworks/ASPinCodeField",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aymen Rebouh": "[email protected]"
    },
    "social_media_url": "https://twitter.com/aymenworks",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/Aymenworks/ASPinCodeField.git",
        "tag": "1.0.4"
    },
    "source_files": [
        "ASPinCodeField/**/*.{swift,h}"
    ],
    "public_header_files": "ASPinCodeField/**/*.h",
    "requires_arc": true,
    "swift_version": "5.0"
}

Pin It on Pinterest

Share This