Search code examples
swiftxcodeuikit

Remove the hide-keyboard button when iOS keyboard is open


In XCode, is there a way to remove the "hide-keyboard" button ? I'm trying to prevent the keyboard from hiding when the hide-keyboard button is tapped and can only be hidden when the done button is tapped.

The only options i found for the textfield and keyboard are:

fullnameTextfield.keyboardType
fullnameTextfield.keyboardAppearance
fullnameTextfield.keyboardLayoutGuide

None of these have any options for hiding a specific button on the keyboard.

hide-keyboard button


Solution

  • Even Apple's legacy "archived" documentation had very little to say about iPad keyboard, but the short answer is:

    no.

    The software keyboard in iPad is also different, because in the landscape orientation, the form factor of the keyboard covers a lot of the screen, and often it will actually cover the insertion point of a text field that is in a non-scrollable view.

    Also, the iPad keyboard has received extra features over time, like Split, Undock, and Floating, and they appear in a menu when you long press this button.

    An iPad developer should work extra hard to make sure that the insertion point is never covered by the soft keyboard, but realistically, I think Apple's choice to be conservative by always providing the "hide keyboard" button is sound.