YogevSitton
YogevSitton

Reputation: 10108

UINavigationController popViewControllerAnimated takes a long time after Touch Id

I'm asking the user to authenticate using Touch Id (on iOS 8). The Touch Id dialog is shown above another view that will take the user input in case of "Enter Password" or "Cancel" buttons is tapped instead of the user authenticating using the finger print.

In case of success - I'm popping the view controller. In case of "Cancel" or "Enter Password" i'm letting the user entering the password and only then (if the password is correct) - I'm popping the view controller.

If the user is entering the password manually - the view is popped immediately. If the user is using the finger print - the popping code is called immediately (according to the debugger and the NSLog that is printing to the console) - but the UI shows the popping after about 5 seconds.

What could be the problem?

Upvotes: 0

Views: 536

Answers (1)

Shai Mishali
Shai Mishali

Reputation: 9382

Try making sure it's running on the main thread, maybe something like a GCD Dispatch would do the trick.

    dispatch_async(dispatch_get_main_queue(), ^{
        [self.navigationController popViewControllerAnimated: YES];
    });

Upvotes: 7

Related Questions