我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

如何实现iOS指纹识别应用-创新互联

创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!

创新互联建站专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、网站设计、海州网络推广、微信平台小程序开发、海州网络营销、海州企业策划、海州品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联建站为所有大学生创业者提供海州建站搭建服务,24小时服务热线:028-86922220,官方网址:www.cdcxhl.com

不懂如何实现iOS指纹识别应用?其实想解决这个问题也不难,下面让小编带着大家一起学习怎么去解决,希望大家阅读完这篇文章后大所收获。

指纹识别(Touch ID)的简单应用,供大家参考,具体内容如下

1、调用

- (void)viewDidLoad {
  [super viewDidLoad];
  // Do any additional setup after loading the view, typically from a nib.
  
  
  [self setupNotification];
  UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
  [button setTitle:@"点击调用" forState:UIControlStateNormal];
  [button addTarget:self action:@selector(actionDidClickButton:) forControlEvents:UIControlEventTouchUpInside];
  [button setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
  [self.view addSubview:button];
}

- (void)actionDidClickButton:(UIButton *)sender
{
  [self touchIDTest];
}
- (void)touchIDTest
{
  [TouchIDManager validateTouchID];
}

- (void)setupNotification
{
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionDidReceiveValidateTouchIDSuccess) name:ValidateTouchIDSuccess object:nil];
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionDidReceiveValidateTouchIDNotAvailable) name:ValidateTouchIDNotAvailable object:nil];
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionDidReceiveValidateTouchIDNotEnrolled) name:ValidateTouchIDNotEnrolled object:nil];
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionDidReceiveValidateTouchIDAuthenticationFailed) name:ValidateTouchIDAuthenticationFailed object:nil];
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionDidReceiveValidateTouchIDCancel) name:ValidateTouchIDCancel object:nil];
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(actionTouchIDLockout) name:ValidateTouchIDLockout object:nil];
}
- (void)actionDidReceiveValidateTouchIDSuccess
{
  NSLog(@"%s",__func__);
}
- (void)actionDidReceiveValidateTouchIDNotAvailable
{
  NSLog(@"%s",__func__);
}
- (void)actionDidReceiveValidateTouchIDNotEnrolled
{
  NSLog(@"%s",__func__);
}
- (void)actionDidReceiveValidateTouchIDAuthenticationFailed
{
  NSLog(@"%s",__func__);
}
- (void)actionDidReceiveValidateTouchIDCancel
{
  NSLog(@"%s",__func__);
}
- (void)actionTouchIDLockout
{
  NSLog(@"%s",__func__);
}
- (void)dealloc
{
  [[NSNotificationCenter defaultCenter]removeObserver:self];
}

网站名称:如何实现iOS指纹识别应用-创新互联
本文网址:http://shouzuofang.com/article/degjpi.html

其他资讯