I am writing a phone-like app with a custom numeric keypad. I would like to search through my contacts for name/phone number as I type on the numeric keypad and displaying the results in a small tableview above the numeric keypad. I therefore would like to do this without using the standard UISearchBar
, since the typed in phone number will be displayed in a toolbar, similar to the built-in phone app. This means that at no time will a textfiels/uisearchbar get to be the responder.
Is there some way of using UISearchBarDelegate
without using UISearchBar
?
A UISearchBarDelegate isn't going to work well for you because many of the delegate methods specify that the caller will pass in a UISearchBar. You could certainly define your own delegate protocol with similar methods, but using the class of your "custom numeric keypad" instead.
Since you would be implementing the delegate in either case, there's not much saving in using the predefined protocol.