iOS指纹识别功能
iOS指纹识别功能Demo LAContext *myContext = [[LAContext alloc] init]; NSError *authError = nil; NSString *myLocalizedReasonString = @"通过Home键验证已有手机指纹"; if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) { NSLog(@"Touch ID可以使用"); [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:myLocalizedReasonString reply:^(BOOL success, NSError * _Nullable error) { if (success) { // 成功 NSLog(@"成功"); UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; SuccessViewController *successVC = [storyboard instantiateViewControllerWithIdentifier:@"SuccessViewController"]; [self.navigationController pushViewController:successVC animated:YES]; } else { // 获取到相应的错误信息····做相应的操作 // 失败 } }]; }else { // NSLog(@"Touch ID 不可用"); }
- 1
- zhtjiayou2016-03-23很好的 谢谢分享
- cdgrom1232019-09-03项目刚好用到
- 粉丝: 27
- 资源: 16
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助