Skip to content

Support non-numeric one-time codes - #2

Merged
theedov merged 1 commit into
theedov:mainfrom
radarlabs:support-non-numeric-codes
Jun 22, 2022
Merged

theedov merged 1 commit into
theedov:mainfrom
radarlabs:support-non-numeric-codes

Conversation

@jrtibbetts

@jrtibbetts jrtibbetts commented Jun 21, 2022 •

Copy link
Copy Markdown
Contributor

(Fixes issue #1)

  • Declared the OneTimeCodeTextFieldDelegate class and OneTimeCodeTextField.oneTimeCodeDelegate property public, and added an OneTimeCodeTextFieldDelegate,allowedCharacters property so that non-numeric codes can be used.

To use it, add a line like the following after the OneTimeCodeTextField has been configured:

<field>.oneTimeCodeDelegate.allowedCharacters = CharacterSet.alphanumerics

You should also specify which corresponding keyboard should be shown, like

<field>.keyboardType = .asciiCapable

…TextFieldDelegate class public, and added an allowedCharacters property to the latter so that non-numeric codes can be used.
@theedov

theedov commented Jun 22, 2022

Copy link
Copy Markdown
Owner

Hi @jrtibbetts,
thanks for the PR, very nice.

@theedov
theedov merged commit 1d9cf51 into theedov:main Jun 22, 2022
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.

2 participants