Forum Discussion

gindi_khangura's avatar
gindi_khangura
Occasional Contributor
11 years ago

[iOS] Close keyboard after type action

Hi, We are typing into a TextField object in VBScript using the Keys method as we want to simulate user input, therefore SetText is not an option, and that triggers the keyboard to pop-up; howe...
  • UnveN's avatar
    11 years ago
    Hi!



    If you want to minimize the keyboard without triggering its return action you can:

    1) Touch some other non-textual control (which closely simulates a real user action to dismiss the keyboard)

    2) Call resignFirstResponder method of the text field (which effectively does the same thing as the first approach)



    Also, just for your information, if you will ever want to also trigger the return action - just

    add either "\r" or "\n" at the end of your input:



    myField.Keys("my input\r");