Simple lock screen for iOS Application
MBSPasswordView
MBSPasswordView is a custom view that provides an easy way to use a block-screen password.
Support
iOS 11.0+
Features
- [X] Pure Swift 4
- [X] Support 4 digits validation
- [X] Light touch impact
- [X] Shakable view
- [X] Custom animation
- [X] Very ease to use.
Success Case
Invalid Case
Installation
CocoaPods
pod 'MBSPasswordView'
Carthage
MBSPasswordView is available through Carthage. To install
it, simply add the following line to your Cartfile:
github "mayckonx/MBSPasswordView"
How to Use
- Import the framework
import MBSPasswordView
- Create an outlet and link it to your view as a MBSPasswordView.
@IBOutlet weak var passwordView: MBSPasswordView!
- Implement the protocol to get the password result.
extension ViewController: MBSPasswordDelegate {
func password(_ result: [String]) {
print("Password:\(result)")
}
}
- Set the delegate in your viewDidLoad
override func viewDidLoad() {
super.viewDidLoad()
passwordView.delegate = self
}
That's it. 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
- Support 6 digits
- Different kind of animations
- TouchID and FaceID