Complex Keyboard implementation

Does anyone know if it’s possible to have keyboard logic work one way in portrait mode but completely different in landscape? For context like In portrait for it to raise a stackview that has textfields inside of it on top of the keyboard but in landscape the desired behavior is now the textfields appear above the keyboard

Replies

It should be possible.

You would have to implement in keyboardWillShow.

  • In portrait:

You may use inputAccessoryView: https://www.hackingwithswift.com/example-code/uikit/how-to-add-a-toolbar-above-the-keyboard-using-inputaccessoryview

  • in landscape

add directly the textFields to the view itself

But please show the code you have, that will help focus the answer.