Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call becomeFirstResponder with dispatch to main queue after delay #915

Merged
merged 1 commit into from Mar 14, 2017

Conversation

joshbruhin
Copy link
Contributor

When user is prompted to use Touch ID and they tap 'cancel', the number pad keyboard is shown (via call to becomeFirstResponder). But, the keyboard is invisible. It is there and not hidden because the user can still tap the keys, but cannot see them. Something inexplicable is happening when switching from Touch ID context back to app context. Calling becomeFirstResponder with dispatch to main queue after delay fixes this.

…er delay to prevent invisible keyboard when user hits ‘cancel’ in touch ID context
// inexplicably causes the keyboard to be invisble. It's not hidden, as user can still
// tap keys, but cannot see them

double delayInSeconds = 0.3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshbruhin
Thanks for figuring this out. How did you choose this delay? I seem to recall (fuzzy on this one) that standard animation time for iOS presentation/dismissal is 0.2 seconds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshbruhin It would be nice to know how you decided on 0.3 for the delay. Thanks!

@joshbruhin
Copy link
Contributor Author

I've always thought it was .3 secs. I'll see if I can determine differently.

@syoung-smallwisdom
Copy link
Contributor

syoung-smallwisdom commented Feb 9, 2017

@joshbruhin No worries. Just curious. Thanks! And yes, you are probably right and I am remembering something different. ;)

Copy link
Contributor

@syoung-smallwisdom syoung-smallwisdom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.
@umerkhan-apple Please take a look, Thanks.

@syoung-smallwisdom
Copy link
Contributor

@joshbruhin
Thanks for fixing. I've updated both https://github.com/Sage-Bionetworks/ResearchKit and mPower-AppStore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants