I've incorporated TouchID into my app with LAContext
, like so:
However, I'm wanting to change the name of the button title from "Enter Password" to enter "Enter Security Code" (or something like that), like this:
How would I go about changing that button title?
Here's the LAContext
documentation and here's my code:
var touchIDContext = LAContext()
if touchIDContext.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &msgError) {
touchIDContext.evaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, localizedReason: touchIDMessage) {
(success: Bool, error: NSError!) -> Void in
if success {
println("Success")
} else {
println("Error: \(error)")
}
}
}
Set the localizedFallbackTitle property:
Objective-C:
LAContext *context = [[LAContext alloc] init];
context.localizedFallbackTitle = @"YOUR TEXT HERE";
Swift:
var touchIDContext = LAContext()
context.localizedFallbackTitle = "YOUR TEXT HERE"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With