ios - Objective-C/Xcode 6: Best way to have a Search Bar populate a table view? -


I have a table view with a search bar above it. I intend that a user enter a query in the search bar and populate the table with the result - either when the user enters the press or they are typing.

After reading several tutorials, I select the search bar and search display controller for the search bar, however, it seems that this controller is a filter-existing-table-view -An entry-query-after-display-result tool is less compared to data tools. This means that I'm coming to a table view which already has all the data and I type - what I want is to come to an empty table view and it has been populated.

I was wondering if there was a way to use the search bar and search display controller I want to achieve the effect or was it a preferred method?

You can have two UITableView
class = "post-text" itemprop = "text">

UISearchDisplayController Code> s will be one of your search view controllers then assume that you are re-replacing your UITableView data lists in your UIViewController , just check that the key If the table is being passed and if it is not for search then do not return anything.

  - (NSArray *) _sectionArrayForTable: (UITableView *) table view {if (tableview == self.searchDisplayController.searchResultsTableView) {// your search results Return} // return 0 do not show anything when not searching; }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -