Latest 0.1.1
License MIT
Platforms ios 9.0
Frameworks UIKit

CI Status


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


Simple View & Lightweight Code

Example Application Usage

  • Simple View
  • Lightweight Code
  • Easy to use in replacement for UIView
  • IBDesignable and IBInspectable properties
  • Customization options


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

pod "PasscodeField"



Simply drag a UIView reference onto your storyboard where you would like it to go. Then set your custom class to PasscodeField and your set. If you would like you can then configure some of the IBInspectable properties via the storyboard attributes editor (or do it in code!). Next you will want to create an IBOutlet for your PasscodeField instance.

Example Application Usage

self.passcodeField.progress = passcodeText.characters.count


Here your just gonna do a frame init, configure, add the subview and your good to go!

let passcodeField = PasscodeField(frame: CGRectMake(100, 100, 300, 40))
passcodeField.progress = 0
// customize options
// passcodeField.length = 12
// passcodeField.fillColor = UIColor.redColor()

Customization options

// passcode length.
var length: Int = 6

// current progress.
var progress: Int = 0 {

// height size of line.
var borderHeight: CGFloat = 2.0

// circle fill color.
var fillColor: UIColor = UIColor.blackColor()

// size of circle and line.
var fillSize: CGFloat = 20


Got a great idea and want to contribute? Here’s how you can help…

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request


Ryota Tomomura (@famtom0518)


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

Latest podspec

    "name": "PasscodeField",
    "version": "0.1.1",
    "summary": "Like an iOS passcode entry view.",
    "description": "PasscodeField is an easy to use and confiure custom view that is perfect forndisplaying results of a secure entry field like a PIN or password. It is inspired by theniOS passcode screen that is used for unlocking devices. It is both IBDesignable and IBInspectablenwhich makes it simple to use and configure for your own project.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "famtom0518": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.1"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0"
    "source_files": "PasscodeField/Classes/**/*",
    "frameworks": "UIKit"

Pin It on Pinterest

Share This