A utility control with built in functionality of pass code view that takes inputs in the form secure entry from user. To get the call back methods, you must implement it’s delegate methods to get the code, when user finish entering the passcode.
ABPasscode
to your Podfilesource 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'ABPasscode', '~> 0.1'
pod install
.Alternatively, you can directly add all files under the folder Core to your project.
Create instance variable of PhotoPicker in your view controller and push in navigation controller.
let passcodeVC = PasscodeViewController()
passcodeVC.delegate = self
navigationController?.pushViewController(passcodeVC, animated: true)
And then call the delegate functions for different event.
extension ViewController: PasscodeViewDelegate {
func passcodeView(_ passcodeView: PasscodeViewController, didEnteredCode code: String) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
self.navigationController?.popViewController(animated: true)
self.lblPasscode.text = "Entered Code: \(code)"
}
}
func passcodeView(_ passcodeView: PasscodeViewController, didTapResendButton resendButton: UIButton) {
}
}
See example projects for detail.
This code is distributed under the terms and conditions of the MIT license.