I have a table and a textfield, I want to create a chat like interface, however when I enter the text field the keyboard pops up, when i hit a button it disappears, so as you send messages the keyboard is popping up, vanishing popping up vanishing, if you try to clear the text field in a button, then the keyboard vanishes the old text is still displayed in the text field even though you removed it.
Without manually building a complete keyboard, and supporting all the IOS keyboard languages features etc, it seems impossible to do a basic chat window is Xojo IOS.
Is there something I am missing?
This can probably done with declares but I don’t know how to do declares. Haven’t found anything in Jerome’s iOSDesignExtensions or Jason’s iOSKit either.
If I’m not mistaken, this is the declare you’re looking for: https://developer.apple.com/documentation/uikit/uitextfielddelegate/1619592-textfieldshouldendediting?language=objc
I suspect we call that method under the hood when users press the “submit” button on the keyboard.
You might file a feature request to be able to prevent the auto dismissal of the keyboard.
But if you look at Messages on iOS, what they do is put a button next to the text field where you type and when you press it, they send the message and immediately clear set the focus back to the entry field and clear its contents. If you take the focus off that field, the keyboard goes away.
For reference on device is different than simulator.
Does not work as a solution, in the textfield open event I use
Declare Function becomeFirstResponder Lib “UIKit” Selector “becomeFirstResponder” (controlHandle As Ptr) As Boolean
in the push button i use
the thextfield1.text="" is ignored
keyboard in early version of Xojo used to pop up now it does not.