Home Is there any way to add a letter to the bottom left area of a UIKeyboardType.NumberPad?
Reply: 1

Is there any way to add a letter to the bottom left area of a UIKeyboardType.NumberPad?

Ethan Allen
1#
Ethan Allen Published in 2017-11-14 22:57:04Z

The UIKeyboardType.NumberPad looks like this:

What I want it to look like is this:

Is there a way to overlay a view in just that corner when the keyboard is up to add this single key? Is this possible with Swift 4?

The reason I want to do this is for easy ISBN number input for users, and some ISBN numbers (10 digits) have an X in them.

rmaddy
2#
rmaddy Reply to 2017-11-15 00:47:30Z

There is no way to modify the keyboard and any attempt to position a button in the correct spot will be a hack you want to avoid.

Probably the cleanest solution is to create a toolbar and set the toolbar as the text field's inputAccessoryView. On the toolbar, add a button for your X and maybe some other buttons such as a keyboard dismiss button, a Next button, or a Done button, etc.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329738 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO