Latest 1.2.1
Homepage https://github.com/eddy-lau/UXPasscodeField
License MIT
Platforms ios 8.0
Authors

[![CI Status](http://img.shields.io/travis/Eddie Lau/UXPasscodeField.svg?style=flat)](https://travis-ci.org/Eddie Lau/UXPasscodeField)
Version
License
Platform

Screenshot

Screenshot

Example Project

To run the example project, clone the repo, and run pod install from the Example directory first.

Sample Code

UXPasscodeField

import UIKit
import UXPasscodeField

class ViewController: UIViewController {

    @IBOutlet weak var passcodeField: UXPasscodeField!

    override func viewDidLoad() {
        super.viewDidLoad()

        passcodeField.becomeFirstResponder()

        // Optional, default is 6
        passcodeField.numberOfDigits = 6

        // Optional, default is false
        passcodeField.isSecureTextEntry = false

        passcodeField.addTarget(
          self,
          action: #selector(ViewController.passcodeFieldDidChangeValue),
          for: .valueChanged)

    }

    @IBAction func passcodeFieldDidChangeValue() {
        print(passcodeField.passcode)
    }

}

UXPasscodeViewController

  let passcodeViewController = UXPasscodeViewController.instantiate()
  passcodeViewController.message = "Hello iOS developer! Please input your 4-digit code here."
  passcodeViewController.numberOfDigits = 4
  passcodeViewController.done { passcode in

      print(passcode)
      _ = passcodeViewController.resignFirstResponder()

  }

Requirements

iOS 8 or above.

Installation

UXPasscodeField is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "UXPasscodeField"

Author

Eddie Lau, [email protected]

License

UXPasscodeField is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UXPasscodeField",
    "version": "1.2.1",
    "summary": "UXPasscodeField is an input control for numeric code",
    "description": "UXPasscodeField is designed for inputting numeric values. It can be used for inputting passcode, PIN, SMS-verification, etc.",
    "homepage": "https://github.com/eddy-lau/UXPasscodeField",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Eddie Lau": "[email protected]"
    },
    "source": {
        "git": "https://github.com/eddy-lau/UXPasscodeField.git",
        "tag": "1.2.1"
    },
    "resource_bundles": {
        "UXPasscodeField": "UXPasscodeField/Resources/*"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "UXPasscodeField/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This