Is it possible to activate the keyboard hint on iOS?
The keyboard looks like the one below, is there any way to activate the hint?
This is a good question for the SDL discussion group: http://discourse.libsdl.org/
The quick answer is that you should use SDL_StartTextInput()
This is not what I'm talking about, when I use "SDL_StartTextInput" I don't get keyboard suggestions like in the image. (predictive text)
So the keyboard gives no hint in SDL.
We probably need to add some flags to SDL_StartTextInput() to define the style of input we want.
We probably need to add some flags to SDL_StartTextInput() to define the style of input we want.
If this is possible to do it would be great because the Android keyboard used to be "Password" mode, which has no hint, and later was changed for "multiline" which has hint, in SDL2 (I think 2.24 version) and this change changes everything on how one would handle the received input.
I've had to patch the Android side of SDL2 since then, so having this available in the API itself in SDL3 would help!
you could find the text field object at runtime and modify its configuration to your needs, something like this:
// root VC has class SDL_uikitviewcontroller
for (UIView* v in UIApplication.sharedApplication.keyWindow.rootViewController.view) {
if (![v isKindOfClass:[UITextField class]])
continue;
UITextField* sdlTextField = (UITextField*)v;
// now adjust properties of sdlTextField
break;
}
Showing suggestions is now the default behavior in SDL3, and you can customize this with SDL_StartTextInputWithProperties()