Scroll view when keyboard displays?

Is there a way to have the text field input scroll up into view when a keyboard opens to start typing?

I have not found a way yet to get views to behave like an iOS app view. And I haven’t found a way by looking at any of the example iOS apps. For example, the ‘springiness’ of the view when swiping up or down. And tap in a field to add text, the keyboard opens, and the view slides the field up into view if it was covered by the keyboard.

Any suggestions on how to do this?

Thanks

[quote=152678:@Aaron Bevan]Is there a way to have the text field input scroll up into view when a keyboard opens to start typing?

I have not found a way yet to get views to behave like an iOS app view. And I haven’t found a way by looking at any of the example iOS apps. For example, the ‘springiness’ of the view when swiping up or down. And tap in a field to add text, the keyboard opens, and the view slides the field up into view if it was covered by the keyboard.

Any suggestions on how to do this?

Thanks[/quote]

If the TextArea extends below half the view vertically (where the keyboard will show) , when the keyboard displays it pushes the view up so the TextArea is displayed in its entirety.

I’m not seeing the view pushed up. I tap in a text field and the keyboard opens up completely hiding the input field. Is there some switch I need to set somewhere to make this happen? Do I need to put my input fields into some type of container?

Sorry, I misread. What I described happens when you use a TextArea and it extends below the place where the keyboard displays.

You may want to use isFirstResponder I just posted a declare at https://forum.xojo.com/18283-isfirstresponder in a timer to detect when the TextField got focus, and modify the constraints by code to move the controls up. Then put them back when the field has lost focus.

This is exactly how it works and you don’t have to do anything extra to make it happen. This is how a native UITextField works so I don’t know why it isn’t working for you.

If you create a new project, throw a TextField near the bottom of the view, run it and tap the TextField, the keyboard doesn’t push the TextField into view? It should.[/quote]

I tried a new project with a TextField at the bottom as you suggested and it does work. The view scrolls the input field up above the keyboard. I will have to figure out why it was not working for me in the app I was building.