title: UISearchBar Keyboard Return Key
body: <p>I am using a UISearchBar to match text input against entries in a database and display the matched results to the user in a UITableView, as they type.</p>
  
  <p>All is well, however, I cannot find a way to alter the return key type of the search bar's keyboard. By default it replaces the standard <kbd>return</kbd> key with a <kbd>Search</kbd> button. Because I am doing a live search as the user types, I do not need this button and having it there and inactive has raised some usability issues.</p>
  
  <p><strong>Attempted solutions</strong></p>
  
  <ol>
  <li><p>I can set a keyboard with the <code>setKeyboard:UIKeyboardType</code> method, however this doesn't seem to override the default setting of replacing the return key (on the standard keyboard) with a <kbd>Search</kbd> key and it does not allow access to change this <kbd>return</kbd> key.</p></li>
  <li><p>I have thought about using a <code>UITextField</code>, giving me access to the <code>returnKeyType</code> property through the <code>UITextInputTraits</code> protocol. My problem with this however is that I am implementing the <code>UISearchBarDelegate</code> method <code>searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText</code>, which I would lose with the <code>UITextField</code>.</p></li>
  </ol>
  
  <p>Is there a way that I can keep the functionality of the search bar's delegate methods, whilst having legitimate access to the keyboard's return key?</p>
  
  <p>In fact, almost the exact screen I am implementing is found in Apple's Clock application<br>
  Screenshot:<br>
  <img src="https://i.stack.imgur.com/iMTbj.png" alt="enter image description here"></p>
  
  <p>So any help on a clean solution would be much appreciated. Note the <kbd>return</kbd> key on the bottom right instead of the default <kbd>Search</kbd> button'.</p>