YJTouchID
文件夹中的两个文件(YJTouchID.h
和 YJTouchID.m
)拖入项目中#import "YJTouchID.h"
/** 初始化 */
YJTouchID *touchid = [[YJTouchID alloc]init];
/** 发起TouchID验证 */
[touchid startYJTouchIDWithMessage:@"自定义信息" fallbackTitle:@"按钮标题" delegate:self];
/** 通过代理方法监听TouchID验证的所有结果 */
/** 其中的成功回调和失败回调是必须要实现的,其他的按实际情况各取所需 */
@required
- (void)YJTouchIDAuthorizeSuccess;
- (void)YJTouchIDAuthorizeFailure;
@optional
- (void)YJTouchIDIsNotSupport;
- (void)YJTouchIDAuthorizeErrorAppCancel;
- (void)YJTouchIDAuthorizeErrorUserCancel;
- (void)YJTouchIDAuthorizeErrorUserFallback;
- (void)YJTouchIDAuthorizeErrorSystemCancel;
- (void)YJTouchIDAuthorizeErrorPasscodeNotSet;
- (void)YJTouchIDAuthorizeErrorTouchIDLockout;
- (void)YJTouchIDAuthorizeErrorInvalidContext;
- (void)YJTouchIDAuthorizeErrorTouchIDNotEnrolled;
- (void)YJTouchIDAuthorizeErrorTouchIDNotAvailable;