Hello everybody,
i have an application with a CustomSearchBar to search in my list entries.
To generally hide the keyboard (click outside the text field to search), I use this code.
That works great. Now I would like to hide the keyboard, too, if I click on the x on the very right of the text field.
Which event do I have to intercept then? I do not really know what I have to look for.
Thanks in advance.
Sven
i have an application with a CustomSearchBar to search in my list entries.
To generally hide the keyboard (click outside the text field to search), I use this code.
Code Block // Dismiss the keyboard self.endEditing(true) ... // Import for dissmissing Keyboard extension View { func endEditing(_ force: Bool) { UIApplication.shared.windows.forEach { $0.endEditing(force)} } }
That works great. Now I would like to hide the keyboard, too, if I click on the x on the very right of the text field.
Which event do I have to intercept then? I do not really know what I have to look for.
Thanks in advance.
Sven