Reputation: 113
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?
Upvotes: 6
Views: 1207
Reputation: 3262
The keyboard type for a creditCardNumber
field changes if you set returnKeyType
.
Upvotes: 4
Reputation: 11
Is that what you're talking about? If so, either the two or just the one, the numeric keypad always opens.
Upvotes: 1