By default if you set a UITextField
keyboard type to Number Pad
when it is displayed, it appears without a keyline above the top keys (iOS10). Is there an easy way to resolve this?
Asked
Active
Viewed 455 times
1 Answers
6
There are a few options, including adding a 1px UIView to the bottom of your layout (perhaps showing/hiding it based on the keyboard notifications), but by far the simplest solution is to add an empty toolbar as the UITextField
's accessory view:
myTextField.inputAccessoryView = UIToolbar()
Which resolves the issue:

cleverbit
- 5,514
- 5
- 28
- 38