I use UISearchBar to match text input with items in the database and display consistent results for the user in the UITableView as they are entered.
Everything is fine, however, I cannot find a way to change the type of return key on the keyboard of the search bar. By default, it replaces the standard return key Search . Since I perform a real-time search as a user, I do not need this button, and the presence there and inactive caused some usability problems.
Attempts to solve
I can install the keyboard using the setKeyboard:UIKeyboardType , however this does not seem to override the default setting of replacing the return key (on the standard keyboard) with the Search key, and it does not allow access to change this return key.
I thought about using UITextField , giving me access to the returnKeyType property through the UITextInputTraits protocol. My problem is that I implement the UISearchBarDelegate searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText , which I would lose with a UITextField .
Is there a way to preserve the functionality of the search bar delegation methods by having legitimate access to the keyboard backspace key?
In fact, the almost accurate screen that I implement can be found in the Apple Clock app
Screenshot:

So any help on a clean solution would be greatly appreciated. Notice the return key at the bottom right, and not the default Search button.
ios iphone
Andy barnard
source share