iOS Keyboard drama (again)

I know this has been talked about a lot of times. Taking another swing at it to see if anyone has has solved this yet.

I really need to be able to have a text field move up without hiding the navigation bar, and without the bottom being obscured by the keyboard.
I’ve done all the work-around I can think of - like making the text filed already higher than we expect the keyboard to go. It’s not pretty.

Anyone?

Hello Chris!

Sounds like you’re maybe describing a scrolling canvas with controls on it? Or… I’m not really sure. Tell us more :slight_smile:

Sorry.
If you put a large text area on a screen and anchor it to the top and bottom, when you tap into it, thr iOS keyboard pops up and shoves the top of the text area way up over the navigation. Yer stuck!

Hi @Chris_Halford did you get a solution to this one?
Thanks
Martin

I did for most cases.
I have one lingering issue that I cannot replicate in any other project.

Is it complicated or something you can share?

The solution was implemented by Xojo.
Is this still not working for you?

@Chris_Halford

Just out of curiosity, what behavior do you expect in this case?

IIRC, the changes I made last fall were to have the control move up based on the location of the cursor itself if the textarea was tall enough to be obscured by the keyboard. That said, yes, the entire view moves upward.

On iPad there is an icon to remove the keyboard but on iPhone when I activate a Textarea there isn’t a way to make the keyboard disappear so you can access the Toolbar

But you still haven’t said what you expect to happen.

FWIW, This is the issue i had when i worked on this. Lots of people said it was behaving badly, but very few could tell us what it should be doing.

Hi Greg,
I want to be able to park the keyboard (Done typing) so I can see the Toolbar at the bottom where I have a share button and compose option.

Look at the image.
The keyboard is covering the text area. That’s not proper behavior.
And to dismiss it you should be able to tap anywhere outside of the text area or keyboard. Does that not work?

I thought of putting a “Done” button above the texture but I don’t know how to hide the keyboard??

Ok, so I suggest the following things:

If you look at just about every other iOS app, the Done or Share buttons are actually in the top right of the view, not at the bottom. There’s a reason for that. That said, you could add a Done button to the accessory portion of the keyboard with a declare which sets the focus somewhere other than the textarea, like the way it works here in the forum.

3 Likes

Is this what you’re looking to have happen (Image at bottom of post)
If it is, I have a modified version of Xojo-iOS-NSNotificationCenter to get the TextArea to shrink as the keyboard pops up.

The original version:

My modified version:
mark-sweeney.com/XojoExamples/Xojo-iOS-NSNotificationCenterModified.zip

1 Like

I think that would be the solution but my project is still an iosview

Thanks Mark & Greg, that made me update that view which I was avoiding. Works great. Point taken Greg also moved the the Share which was a hangover from my first share project.

Hi Chris,
I probably need to put the listbox at the bottom and textarea at the top but then the listbox would be covered which the user would most likely refer to when adding notes in the textarea.
Bit of a design sticking point which isn’t an issue on iPad.
And no it doesn’t disappear when you tap outside the textarea

did you try .ClearFocus on the textarea when done?
Normally in iOS you can call endEditing so that the keyboard closes, xojo may do the same with clearFocus i guess?

Clearfocus wasn’t available because I was still using an IOSView but have since updated to mobile and implemented Mark’s suggestions. All working great now.

3 Likes