Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instant searching using the UISearchBar/UISearchController in swift 3

Tags:

I am trying to add the instant search functionality into my existing controller using the UISearchBar or UISearchController

  • When user enters 3 characters on searchbar, should start fetching the data & show in the tableview. For that I added the API call on searchBar Delegate, but it takes time to fetch the data , while user again start entering the data, each time user enters a character , it hits one api.

What approach should we follow to achieve it ?

Is there any good library or open source to do it?

like image 665
MANISH PATHAK Avatar asked Dec 08 '16 19:12

MANISH PATHAK


1 Answers

You can use InstantSearch iOS, which is an open-source library providing UI components to help you easily build instant search experiences on iOS with Algolia.

It is available on GitHub. See for example the InstantSearch E-commerce app:

enter image description here

You can start with the Getting Started Guide which will take you through the main steps to use the library.

The example application is also a great addition to the guide as it’ll help you get an idea of what you can build with InstantSearch iOS.

Disclaimer: I am the author of InstantSearch iOS

like image 171
Guy Daher Avatar answered Sep 26 '22 16:09

Guy Daher