Add gesture verification to your app

Source: Internet
Author: User
<span id="Label3"></p><p><p>Tool Class:</p></p><p><p>. h file:</p></p><pre><span style="color: #0000ff;"><span style="color: #0000ff;">#import</span></span><LocalAuthentication/LocalAuthentication.h><span style="color: #0000ff;"><span style="color: #0000ff;">#if</span></span>Target_iphone_simulator<span style="color: #0000ff;"><span style="color: #0000ff;">#define</span></span>Wjnotice (chinese,english) [[[[nsuserdefaults standarduserdefaults] objectforkey:@ "applelanguages"] objectAtIndex:0 ] isequaltostring:@ "zh-hans-us"]? Chinese:english<span style="color: #0000ff;"><span style="color: #0000ff;">#elif</span></span>Target_os_iphone<span style="color: #0000ff;"><span style="color: #0000ff;">#define</span></span>Wjnotice (chinese,english) [[[[nsuserdefaults standarduserdefaults] objectforkey:@ "applelanguages"] objectAtIndex:0 ] isequaltostring:@ "zh-hans-cn"]? Chinese:english<span style="color: #0000ff;"><span style="color: #0000ff;">#endif</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">@class</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchid;</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">@protocol</span></span>Wjtouchiddelegate <NSObject><span style="color: #000000;"><span style="color: #000000;">@required</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">TouchID Verification Success * * (english Comments) authentication Successul</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizesuccess;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">TouchID Authentication failed * * (中文版 Comments) authentication Failure</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizefailure; @optional</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* Cancel TouchID verification (user clicked Cancel) * * (中文版 Comments) authentication was canceled by user (E.G. tapped cancel button). <!-- c1--></span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrorusercancel;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">in the TouchID dialog box click the Enter Password button * * (english Comments) User tapped the fallback button</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerroruserfallback;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* In the process of verifying the TouchID is canceled by the system such as suddenly come to the phone, press the home button, lock screen ... * * (english Comments) authentication is canceled by system (E.G. a nother application went to foreground). </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrorsystemcancel;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* Cannot enable touchid, device not set password * * (chinese Comments) authentication could not start, because passcode are not set on the Device. </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrorpasscodenotset;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* Device does not enter touchid, cannot enable TouchID * (中文版 Comments) authentication could not start, because Touch ID have no Enrolle D Fingers</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrortouchidnotenrolled;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">The TouchID of the device is invalid * * (中文版 Comments) authentication could not start, because Touch ID was not available on the de Vice. </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrortouchidnotavailable;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* Multiple consecutive use of Touch ID failed, Touch ID is locked, require user input password unlock * * (english Comments) authentication is not successful, because there Were too many failed Touch ID attempts and Touch ID is now Locked. Passcode is required to unlock Touch ID, e.g. evaluating Lapolicydeviceownerauthenticationwithbiometrics would ask for pass Code as a Prerequisite. * </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrortouchidlockout;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">The current software has been suspended for cancellation of authorization (such as a sudden call, application into the foreground) * * (english Comments) authentication is canceled by application (E.G. invalidate Was called and authentication was inprogress). * </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrorappcancel;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * the <span style="color: #008000;">current software is pending cancellation of authorization (during The authorization process, the Lacontext object is released) * * (english Comments) Lacontext passed to the "has been previously inv Alidated. </span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidauthorizeerrorinvalidcontext;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* * <span style="color: #008000;">Fingerprint identification is not supported on current device * * (中文版 Comments) The does not fingerprint identification</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>-(<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) wjtouchidisnotsupport;</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">@end</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">@interface</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchid:lacontext@property (nonatomic, weak)</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">ID</span></span><WJTouchIDDelegate><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">;</span></span><span style="color: #008000;"><span style="color: #008000;">/*</span></span><span style="color: #008000;">* <span style="color: #008000;">* Initiate TouchID verification (Initiate TouchID Validation) * * @param message prompt box needs to display the information by default: enter the password (Fallback button title. Default is "Enter Password")</span></span><span style="color: #008000;"><span style="color: #008000;">*/</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span>) startwjtouchidwithmessage: (nsstring *) Message<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span>:(<span style="color: #0000ff;"><span style="color: #0000ff;">ID</span></span><WJTouchIDDelegate>)<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">@end</span></span></pre><p><p>. m file</p></p><pre><span style="color: #0000ff;"><span style="color: #0000ff;">@implementation</span></span><span style="color: #000000;"><span style="color: #000000;">Wjtouchid</span></span>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span>) startwjtouchidwithmessage: (nsstring *) Message<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span>:(<span style="color: #0000ff;"><span style="color: #0000ff;">ID</span></span><WJTouchIDDelegate>)<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">{lacontext</span></span>*context =<span style="color: #000000;"><span style="color: #000000;">[[lacontext alloc]init]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">context.localizedfallbacktitle = fallbacktitle;</span></span><span style="color: #000000;"><span style="color: #000000;">Nserror</span></span>*error =<span style="color: #000000;"><span style="color: #000000;">nil; Self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span>=<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">; Nsassert (self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span>! = nil, Wjnotice (<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">wjtouchiddelegate cannot be empty</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span>,<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">wjtouchiddelegate must be Non-nil</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">)); </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([context Canevaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics error:&<span style="color: #000000;"><span style="color: #000000;">Error]) {[context evaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics localizedreason:message</span></span>= nil? Wjnotice (<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">Default Prompt Information</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span>,<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;">the <span style="color: #800000;">Default Message</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span>): message reply:^ (BOOL success, nserror *<span style="color: #000000;"><span style="color: #000000;">_nullable Error) { </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span><span style="color: #000000;"><span style="color: #000000;">(success) {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">Open Success</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizesuccess)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizesuccess]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Else</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span><span style="color: #000000;"><span style="color: #000000;">(error) {</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Switch</span></span><span style="color: #000000;"><span style="color: #000000;">(error.code) {</span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">laerrorauthenticationfailed: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">TouchID Validation Failure</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizefailure)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizefailure]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerrorusercancel: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">Cancel TouchID verification (user clicked Cancel)</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrorusercancel)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrorusercancel]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerroruserfallback: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">in the TouchID dialog box, Click the Enter password button</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerroruserfallback)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerroruserfallback]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">laerrorsystemcancel:{</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">in the process of verifying the TouchID is canceled by the system such as suddenly come to the phone, press the home button, lock screen</span> ...</span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrorsystemcancel)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrorsystemcancel]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">laerrortouchidnotenrolled: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">The device does not enter TouchID and cannot be enabled TouchID</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrortouchidnotenrolled)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrortouchidnotenrolled]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerrorpasscodenotset: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">Unable to enable touchid, device does not have password set</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrorpasscodenotset)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrorpasscodenotset]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">laerrortouchidnotavailable: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">the TouchID of the device is invalid</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrortouchidnotavailable)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrortouchidnotavailable]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerrortouchidlockout: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">multiple consecutive use of Touch ID failed, Touch ID locked, requires user to enter a password to unlock</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrortouchidlockout)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrortouchidlockout]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerrorappcancel: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">the current software is pending cancellation of authorization (such as a sudden call, the app enters the Foreground)</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrorappcancel)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrorappcancel]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> case</span><span style="color: #000000;"><span style="color: #000000;">Laerrorinvalidcontext: {</span></span><span style="color: #808080;"><span style="color: #808080;">///</span></span><span style="color: #008000;"><span style="color: #008000;">the current software is pending cancellation of authorization (during The authorization process, the Lacontext object is Released)</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidauthorizeerrorinvalidcontext)]) {[[nsoperationqueue mainqueue] addoperationwithblock:</span></span>^<span style="color: #000000;"><span style="color: #000000;">{[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidauthorizeerrorinvalidcontext]; }]; } } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;"></span> break</span><span style="color: #000000;"><span style="color: #000000;">; } } }]; } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Else</span></span><span style="color: #000000;"><span style="color: #000000;"> { </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([self.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">respondstoselector: @selector (wjtouchidisnotsupport)]) {[self.</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span><span style="color: #000000;"><span style="color: #000000;">wjtouchidisnotsupport]; } }} </span></span></pre><p><p>Calling the corresponding Proxy method</p></p><p><p>Add gesture verification to your app</p></p></span>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.