zoukankan      html  css  js  c++  java
  • 指纹识别

    http://www.it165.net/pro/html/201406/15907.html

     if ([UIDevice currentDevice].systemVersion.floatValue < 8.0) {

            NSLog(@"不支持");
    }

     // 提示:指纹识别只是判断当前用户是否是手机的主人!程序原本的逻辑不会受到任何的干扰!

    - (void)addLocalAuthentication
    {
        LAContext *myContext = [[LAContext alloc] init];
        
        NSError *authError = nil;
        
        NSString *myLocalizedReasonString = @"请输入指纹";
        
        if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
            
            [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
                      localizedReason:myLocalizedReasonString
                                reply:^(BOOL success, NSError *error) {
                                    if (success) {
                                        NSLog(@"成功");
                                    } else {
                                        NSLog(@"失败");
                                        
                                        switch (error.code) {
                                            case -1: // 手势密码错误
                                            {
                                                NSLog(@"手势密码错误");
                                            }
                                                break;
                                            case -2: // 取消
                                            {
                                                NSLog(@"取消,返回最初界面");
                                            }
                                                break;
                                            case -3: // 输入密码
                                            {
                                                NSLog(@"输入密码");
                                            }
                                                break;
                                            default:
                                                break;
                                        }
                                    }
                                    
                                    
                                }];
        } else {
            
            NSLog(@"还没有设置指纹密码");
        }
        
        
        
        
    }

  • 相关阅读:
    js object 常用方法总结
    深入研究js中的位运算及用法
    input事件中文触发多次问题研究
    景点地图开发实战
    炫酷线条动画--svg
    转:绝对干货--WordPress自定义查询wp_query所有参数详细注释
    canvas实例 ---- 制作简易迷宫(一)
    炫酷弹窗效果制作
    js排序算法总结—冒泡,快速,选择,插入,希尔,归并
    js 实现 promise
  • 原文地址:https://www.cnblogs.com/jzlblog/p/4368554.html
Copyright © 2011-2022 走看看