- How to get PFQueryTableViewController , Pagination working with UISearchDisplayController?
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I am trying to add Search to Todo application. I have Searchbar working. The issue is that the Pagination doesn't work anymore. How do I get the Pagination working for normal tableview and serchresults tableview?
Checkout MyTableController.m file and plz fix :)

awarded to gelioson

Crowdsource coding tasks.

1 Solution

Winning solution

Here is quick and dirty solution that might help :)
The idea is to create extra row for pagination cell if not all rows are fetched and manually process Pagination for search results.

Here is my version of MyTableController.m:

Thanks for the solution!! Is it possible to modify search to wait until we Finish the search Keyword? Right now it crashes on typing on iPhone.
Krishna over 9 years ago
Sorry, I'm unable to reproduce the crash :( Sure you can perform search whenever you want.. But how long do you want to wait? You can start search when user press Search button on keyboard. To do this you should call 'filterResults' from searchBarSearchButtonClicked instead of shouldReloadTableForSearchString. Also you need so set needed delegates. Here is updated version of MyTableController.m that performs search on keyboard button pressed:
gelioson over 9 years ago
Thanks @gelioson!
Krishna over 9 years ago