Instant search using UISearchBar / UISearchController in swift 3

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

  • When the user enters 3 characters in the searchbar , you should start searchbar data and show it in the table view. To do this, I added an API call for the searchBar delegate, but it takes time to get the data, and the user starts entering data again, every time the user enters a character, he gets one api.

What approach should we follow to achieve this?

Is there a good library or open source?

+5
source share
1 answer

You can use InstantSearch iOS , which is an open source library that provides user interface components to help you easily create instant search queries on iOS using Algolia .

available on github . See For example, InstantSearch E-Commerce Application :

enter image description here

You can start with the Getting Started Guide , which provides basic steps for using the library.

The sample application is also a great complement to the tutorial as it helps you understand what you can create with InstantSearch iOS.

Disclaimer: I am the author of InstantSearch iOS

+4
source

Source: https://habr.com/ru/post/1261014/


All Articles