myeyesareblind / DMPasscode

:lock: Passcode screen with Touch ID support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DMPasscode

Build Status Version License twitter: @dylan36032

A simple passcode screen that can be displayed manually. If Touch ID is available the user can skip the screen and instead use his fingerprint to unlock.

Can easily be customised to fit your design.

image

Installation

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

pod "DMPasscode"

If you're not using CocoaPods you'll find the source code files inside Pod/Classes. You'll also have to add the DMPasscode.bundle to your project.

Usage

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

The class DMPasscode contains following methods:

+ (void)setupPasscodeInViewController:(UIViewController *)viewController completion:(PasscodeCompletionBlock)completion;
+ (void)showPasscodeInViewController:(UIViewController *)viewController completion:(PasscodeCompletionBlock)completion;
+ (void)removePasscode;
+ (BOOL)isPasscodeSet;
+ (void)setConfig:(DMPasscodeConfig *)config;

Customisation

You can pass DMPasscode a configuration. Just create a new DMPasscodeConfiguration.
Following properties are available to customise the passcode screen:

animationsEnabled
backgroundColor
navigationBarBackgroundColor
navigationBarForegroundColor
statusBarStyle
fieldColor
emptyFieldColor
errorFont
errorBackgroundColor
errorForegroundColor
descriptionColor
inputKeyboardAppearance
instructionsFont
navigationBarTitle
navigationBarFont
navigationBarTitleColor

About

:lock: Passcode screen with Touch ID support

License:MIT License


Languages

Language:Objective-C 91.8%Language:Shell 3.9%Language:C 3.1%Language:Ruby 1.0%Language:C++ 0.2%