Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bringing up the iPad keyboard which is predominantly symbols

Apologies in advance if this is answered but I genuinely couldn't find it. I'm trying to bring up the keyboard type on iPad which appears when pressing the "#+=" button. I've tried going through all the types on the docs and I'm sure that this wasn't successful. Am I missing something or does the user have to click this button every time?

Edit: this question was closed as "off-topic" because it didn't include code or ideas or what I've tried already... Therefore for a bit of extra detail, I used EVERY keyboard type that is available on the docs e.g.

theTextField.keyboardType = UIKeyboardTypeNumberPad;

This did not yield the results that I require, which is the keyboard plane that appears when you press the #+= button because I wanted users to go straight to that one.

like image 973
Rob W Avatar asked Feb 16 '23 15:02

Rob W


2 Answers

Unfortunately, this is impossible. It's not a keyboard type you want, it's a keyboard plane. There is no public API to switch or in any way access the keyboard planes.

One solution could be to create your own keyboard with the symbols you want. Another solution would be to open the keyboard and then generate a touch event that will switch the keyboard plane. However, this would be complicated, non-portable and a bit dangerous.

like image 182
Sulthan Avatar answered Apr 26 '23 04:04

Sulthan


You have no ability to affect the built-in keyboards.

You can however create your own custom input view which you would set on the inputView of your text editing view before you make it first responder. Then iOS will show this view instead.

Have a look at this project of mine which implemented a "Morse keyboard" (April Fool's joke), but demonstrates how to achieve a custom keyboard that still interacts with a text field as you'd expect. http://www.cocoanetics.com/2012/04/dtmorsekeyboard-tutorial/

like image 38
Cocoanetics Avatar answered Apr 26 '23 04:04

Cocoanetics