How to remove Enter Password and Cancel button from Touch ID alert view How to remove Enter Password and Cancel button from Touch ID alert view ios ios

How to remove Enter Password and Cancel button from Touch ID alert view


To hide the button "Enter password", you need to set localizedFallbackTitle to an empty string.

//...LAContext *context = [[LAContext alloc] init];// Hide "Enter Password" buttoncontext.localizedFallbackTitle = @"";// show the authentication UI//...

About the "Cancel" button I don't think that it is possible to remove it.

Hope that it will be helpful.


There is localizedFallbackTitle property of LAContext class. If you want custom text instead of “Enter password” then you can set here.

If it is set to empty string then the button will be hidden.

Screenshot 1

Below is code that I’ve used :

 //MARK: - scanFingerPrint    func scanFingerPrint() {        let authContext:LAContext = LAContext()        authContext.localizedFallbackTitle = ""    . . .    }

Screenshot 2


Look at LAContext.h, I found this:

/// Fallback button title./// @discussion Allows fallback button title customization. A default title "Enter Password" is used when///             this property is left nil. If set to empty string, the button will be hidden.@property (nonatomic, copy) NSString *localizedFallbackTitle;

You should set localizedFallbackTitle = @"" -- empty string;. Let's try it and accept answer if it work.