Latest 1.0.4
License MIT
Platforms ios 11.0

Build Status Coverage Status Platform

MBSPasswordView is a custom view that provides an easy way to use a block-screen password.


iOS 11.0+


  • [X] Pure Swift 4 🔨
  • [X] Support 4 digits validation 🔒
  • [X] TouchID and FaceID 🤳🏻
  • [X] Light touch impact ♒︎
  • [X] Shakable view 💥
  • [X] Custom animation 💫
  • [X] Easy to use. 🤟🏻

Success Case

Invalid Case



pod 'MBSPasswordView'


MBSPasswordView is available through Carthage. To install
it, simply add the following line to your Cartfile:

github "mayckonx/MBSPasswordView"

How to Use

  1. Import the framework

    import MBSPasswordView
  2. Go to your Storyboard/XIB -> Identity Inspector and change your UIView class and module to:

  3. Create an outlet and link it to your view as a MBSPasswordView.

    @IBOutlet weak var passwordView: MBSPasswordView!
  4. Implement the protocol to get the password result.

    extension ViewController: MBSPasswordDelegate {
     func password(_ result: [String]) { // optional
    func passwordFromBiometrics(_ result: Result<[String]>) { // optional
  5. Set the delegate in your viewDidLoad

    override func viewDidLoad() {
       passwordView?.delegate = self
       passwordView?.titleToRequestAuthentication = "Please, identify your self!"
       passwordView?.start(enableBiometrics: true)

If you want, you can also check if the device supports FaceID/TouchID using:


That’s it. If you enable biometrics, you get the password and automatically request the TouchID/FaceID every time. You just need to pass enableBiometrics: true on the start method.
It’s done brah!

You can customize the view. In the sample you can see how to access the properties and change it to your preferences.

Next improvments

  1. Support 6 digits
  2. Different kind of animations

Suggestions or feedback?

Feel free to create a pull request, open an issue or find me on Twitter.

Latest podspec

    "name": "MBSPasswordView",
    "version": "1.0.4",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": "Mayckon Barbosa da Silva",
    "source": {
        "git": "",
        "tag": "v1.0.4"
    "source_files": "MBSPasswordView/**/*",
    "exclude_files": "MBSPasswordView/*.plist",
    "platforms": {
        "ios": "11.0"
    "swift_version": "4.2",
    "summary": "Simple lock screen for iOS Application.",
    "description": "# MBSPasswordViewnMBSPasswordView is a custom view that provides an easy way to use a block-screen password."

Pin It on Pinterest

Share This