How to use TouchID in landscape mode?

I want to use TouchID in my application, which is only in landscape mode. Everything is in order, but the authentication notification is displayed only in portrait mode. what should I do?

Here is my code:

LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = [[NSString alloc] initWithUTF8String: title];

if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
         [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
                   localizedReason:myLocalizedReasonString
                             reply:^(BOOL success, NSError *error) {
                                 if (success) {
                                     // User authenticated successfully, take appropriate action
                                     NSLog(@"Authenticated using Touch ID.");
                                     //do something
                                 } else {
                                     // User did not authenticate successfully, look at error and take appropriate action
                                     if (authError.code == kLAErrorUserFallback) {
                                         NSLog(@"User tapped Enter Password");
                                     } else if (authError.code == kLAErrorUserCancel) {
                                         NSLog(@"User tapped Cancel");
                                     } else {
                                         NSLog(@"Authenticated failed.");
                                     }
                                 }
                             }];
} else {
    // Could not evaluate policy; look at authError and present an appropriate message to user
    NSLog(@"Touch ID is not available: %@", authError);
}
+4
source share
1 answer

The App Store app turns the Touch ID alert, but it seems to be a hack.

When you rotate the device (I tried using 6+), you see that the gray alpha mask rotates along with the Touch ID warning. They can apply the transformation in the view, but I still have not figured out how to get to this point of view.

XCode Touch ID . , .

: Apple . RadarWeb ID 19893424

+5

All Articles