欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

iOS指紋識(shí)別的簡(jiǎn)單應(yīng)用

 更新時(shí)間:2020年07月01日 08:40:39   作者:青燈古魔  
這篇文章主要為大家詳細(xì)介紹了iOS指紋識(shí)別的簡(jiǎn)單應(yīng)用,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

指紋識(shí)別(Touch ID)的簡(jiǎn)單應(yīng)用,供大家參考,具體內(nèi)容如下

1、調(diào)用

- (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:@"點(diǎn)擊調(diào)用" 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];
}

具體demo

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • iOS開發(fā)Masonry與Frame布局差異示例詳解

    iOS開發(fā)Masonry與Frame布局差異示例詳解

    這篇文章主要為大家介紹了iOS開發(fā)Masonry與Frame布局差異示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-11-11
  • iOS中關(guān)于音樂鎖屏控制音樂(鎖屏信息設(shè)置)的實(shí)例代碼

    iOS中關(guān)于音樂鎖屏控制音樂(鎖屏信息設(shè)置)的實(shí)例代碼

    這篇文章主要介紹了 iOS中關(guān)于音樂鎖屏控制音樂(鎖屏信息設(shè)置)的實(shí)例代碼,需要的朋友可以參考下
    2017-01-01
  • IOS開發(fā)環(huán)境windows化攻略

    IOS開發(fā)環(huán)境windows化攻略

    本人主要介紹了IOS開發(fā)環(huán)境windows化攻略,需要的朋友可以參考下
    2013-06-06
  • iOS UILabel根據(jù)內(nèi)容自動(dòng)調(diào)整高度

    iOS UILabel根據(jù)內(nèi)容自動(dòng)調(diào)整高度

    這篇文章主要為大家詳細(xì)介紹了iOS UILabel根據(jù)內(nèi)容自動(dòng)調(diào)整高度,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • iOS中監(jiān)聽UITextField值改變事件的方法實(shí)例

    iOS中監(jiān)聽UITextField值改變事件的方法實(shí)例

    UITextField 是一個(gè)用來處理文本輸入和現(xiàn)實(shí)的控件,在我們的開發(fā)當(dāng)中也是經(jīng)常被用到。下面這篇文章主要給大家介紹了關(guān)于iOS中監(jiān)聽UITextField值改變事件的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2018-07-07
  • IOS開發(fā)UIButton(左邊圖片右邊文字效果)

    IOS開發(fā)UIButton(左邊圖片右邊文字效果)

    本篇文章主要實(shí)現(xiàn)了實(shí)現(xiàn)UIButton左邊圖片,圖片后面緊跟文字效果,類似微信發(fā)現(xiàn)功能,有需要的朋友可以了解一下。
    2016-10-10
  • 簡(jiǎn)單談?wù)刢/c++中#import、#include和@class的區(qū)別

    簡(jiǎn)單談?wù)刢/c++中#import、#include和@class的區(qū)別

    對(duì)于#import,我想做過iOS開發(fā)的人應(yīng)該都不陌生。在開發(fā)過程中,當(dāng)我們需要聲明某一個(gè)類時(shí),都需要去引用。而#imclude的話,在我們學(xué)習(xí)C時(shí)就已經(jīng)知道了,他的作用也是引用聲明的意思。在表面上他們的作用似乎都是一樣的。但是在具體功能實(shí)現(xiàn)方式上,還是有著很大的區(qū)別。
    2018-01-01
  • 在Swift中使用JSONModel 實(shí)例代碼

    在Swift中使用JSONModel 實(shí)例代碼

    本文主要介紹在Swift中使用JSONModel,這里給大家提供代碼實(shí)例做參考,希望能幫助有需要的小伙伴
    2016-07-07
  • iOS App開發(fā)中UITextField組件的常用屬性小結(jié)

    iOS App開發(fā)中UITextField組件的常用屬性小結(jié)

    這篇文章主要介紹了iOS App開發(fā)中UITextField組件的常用屬性小結(jié),文中還介紹了UITextField隱藏鍵盤及為內(nèi)容增加校驗(yàn)的兩個(gè)使用技巧,需要的朋友可以參考下
    2016-04-04
  • iOS自定義鍵盤切換效果

    iOS自定義鍵盤切換效果

    這篇文章主要為大家詳細(xì)介紹了iOS自定義鍵盤切換效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-04-04

最新評(píng)論