uikituisearchbar

How to add a search bar above the keyboard, like Safari on iPad


How can I add a search bar above the keyboard as the Safari does? If I add it as 'inputAccessoryView', using 'someTextField.inputAccessoryView = UISearchBar()', it's added above the shortcuts bar, but in Safari it's in the shortcuts bar.

enter image description here

Is there a special control for it? I see some other apps using it as well. On an iPad with a hardware keyboard, it minimizes itself. If I add an UISearch bar like described above, it works, but it does not look like in Safari. The Safari one also shows a button for changing the current input mode, on the left side. enter image description here


Solution

  • Answering my own question here, you have to use UIFindInteraction