How can I achieve the standard iOS behavior for te...
# compose-ios
m
How can I achieve the standard iOS behavior for text fields in Compose? Currently, when I have a text field at the bottom, Compose adds padding to the entire screen, cutting out the top. Also, I'm unable to hide the keyboard once the text field is focused. Is this a limitation in the alpha state or am I missing something?
n
We are working on iOS textfields to make them to feel standard. Though you are free to create issues about them to be sure that we don't miss them (check this list https://github.com/JetBrains/compose-multiplatform/issues/2986 to learn on what we are working)
👀 2
m
Thanks! Will take a look
d
To control this behavior you can use configure argument in ComposeUIViewController builder:
Copy code
ComposeUIViewController(
    configure = {
        onFocusBehavior = OnFocusBehavior.DoNothing
        // by default it is FocusableAboveKeyboard
    }
) {
    Text("Your Compose UI")
}
And after that use WindowInsets.ime to granually control part of your Compose UI.
131 Views