I am setting my text field's content type and keyboard type as follows:
numberTextField.textContentType = .creditCardNumber
numberTextField.keyboardType = .numberPad
However, the resulting keyboard is the default QWERTY keyboard. The number pad keyboard only shows up when I remove the textContentType
setting.
This happens both when I set these attributes programmatically and in the interface builder.
Is this a bug or am I missing something?
The keyboard type for a creditCardNumber
field changes if you set returnKeyType
.
Is that what you're talking about? If so, either the two or just the one, the numeric keypad always opens.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With