I have followed this tutorial: http://blog.patrickcrosby.com/2010/04/27/iphone-ipad-uisearchbar-uisearchdisplaycontroller-asynchronous-example.html
In order to get my UISearchBar
with SearchDisplayController. It works fine, but I don't know how make it so that when you press a suggestion from the drop down list UITableViewCells
, it acts like an action and executes a method, where I can go something like:
NSString *Selected = [self SearchBar.selectedCell.text];
I am new to iPhone programming and sometimes find its quirks a tad confusing.
I have two view controllers and I'd ideally like to return the result you select from the searchDisplayController back to the initial ViewController, but just getting it to respond to a selection would be good. At the moment the cell just turns blue when you select it.
Here is my project so far: https://www.dropbox.com/s/m0zgookbwot05bo/Stocks%26Shares.zip
Click 'Search Companies' to see the UISearchBar and SearchDisplayController in its current state.
Any help would be great. If you need more info please just ask!