I'm looking through the TableSearch example code provided by Apple. In the cellForRowAtIndexPath method, depending on if an item is being searched or not, the table gets updated. I was wondering if this type of functionality can be implemented without using a UITableView. I'm tryign to copy that functionality with a horizontal display of cards. Thinking out loud, assuming this is possible, I would
have my horizontal display of cards have a delegate that can be called when something is typed in the search bar.
would i subclass UISearchBar to add this delegate, so I could do
something like searchBar.myNewDelegate = horizontalDisplay;
No need to subclass, just make your controller conform to the UISearchBarDelegate protocol and you can implement all of the text did change methods to do what you want. http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UISearchBarDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UISearchBarDelegate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With