Latest 1.0.2
Homepage https://github.com/edwinps/CZSecurityTouchID
License MIT
Platforms ios 8.0
Authors

CZSecurityTouchID secures your app by requiring a Touch ID fingerprint or passcode.

Validation Adjustment
CZSecurityTouchID CZSecurityTouchID

Installation

The easiest way to get started is to use CocoaPods. Just add the following line to your Podfile:

pod 'CZSecurityTouchID'

Usage

1. import the class

#import <T21FingerPrint.h>

Create a simple validation view

In order to conform to the PinViewControllerValidate protocol you have to adopt it in your UIViewController

ViewController () <PinViewControllerValidateDelegate>

To conform to the PinViewControllerValidateDelegate you have to implement the following functions:

-(void)pinViewControllerDidSetWrongPin:(pinViewAction)action{

}
-(void)pinViewControllerDidSetСorrectPin:(pinViewAction)action{    
}

To create a validation view

UIViewController *vc = [[FingerPrint sharedInstance] createPinViewWithScope:PinViewControllerScopeValidate WithvalidationDelegate:self];
  • Scope:
    • PinViewControllerScopeValidate : the view for request the pin or finger print (Need to have some pin saved)
    • PinViewControllerScopeCreate : the view for create a new pincode
    • PinViewControllerScopeChange : the view for change the pincode
    •  PinViewControllerScopeDesactive : the view to delete the pincode
  • validationDelegate: PinViewControllerValidateDelegate
    This method return to UIViewController and you can add in your navigation flow

Create an adjustment view that covers all scope

Is a simple view to configure all the options of the pin and touch id

To create a setting view

UIViewController *vc = [[FingerPrint sharedInstance] createSettingViewWithAppearance:nil withPinViewControllerAppearance:nil];

This method return to UIViewController and you can add in your navigation flow

Other Setting

Setting up length For Pin code
By default is 4

[[FingerPrint sharedInstance] setLengthForPin:4];

Setting up the validation view appearance

PinAppearance * appearance = [[PinAppearance alloc] init];
appearance.logo = [UIImage imageNamed:@"sc_logo"];
/*You can configure all the attributes you need */
[FingerPrint sharedInstance].appearance = appearance;

Setting up the adjustment view appearance and PinCode View

SettingsAppearance *SettingAppearance = [[SettingsAppearance alloc] init];
SettingAppearance.titleGroupText = @"Group title";
/*You can configure all the attributes you need */

PinAppearance * pinAppearance = [[PinAppearance alloc] init];
appearance.logo = [UIImage imageNamed:@"sc_logo"];
/*You can configure all the attributes you need */
 [[FingerPrint sharedInstance] createSettingViewWithAppearance:SettingAppearance withPinViewControllerAppearance:pinAppearance];

Latest podspec

{
    "name": "CZSecurityTouchID",
    "version": "1.0.2",
    "summary": "Library with two screens for configuration and validation by pin and fingerprint",
    "authors": {
        "Edwin Peu00f1a": ""
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/edwinps/CZSecurityTouchID.git",
        "tag": "1.0.2"
    },
    "source_files": "src/**/*.{h,m}",
    "resources": [
        "res/img/*.{png}",
        "src/xibs/*.{xib}"
    ],
    "homepage": "https://github.com/edwinps/CZSecurityTouchID",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    }
}

Pin It on Pinterest

Share This