Is there any way to disable the Touch ID prompt (UIAlertview)?

后端 未结 2 1415
死守一世寂寞
死守一世寂寞 2020-12-17 06:36

Trying to Integrate TouchId in my application, and i was successful too.

The Question is Can we customize the Default TouchID UIalertview ? Can we Disable it?

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 07:26

    You can customized it the message in the alert can be set with the localizedReason parameter - (void)evaluatePolicy:(LAPolicy)policy localizedReason:(NSString *)localizedReason reply:(void (^)(BOOL success, NSError *error))reply

    You can also set the action button (default is "Enter Password") with

    LAContext *context = [[LAContext alloc] init]; context.localizedFallbackTitle = [your message]

    The "localizedFallbackTitle" is not in the docs but part of the LAContext .h file

提交回复
热议问题