Add animation logic while search is loading (Swift)

Hey guys, I was wondering how I would be able to implement animation while the search was loading in the searchController. Spotify uses this loading icon (see below) to load results while the search is performing, so I was wondering is there a whileAnimating function hidden somewhere? Or if not, how would I be able to implement this?

Screenshot 2021-03-16 at 17.48.24

Hi @davidchen02 ,

We provide Loading widget as a part of our InstantSearch library. You can create your own implementation of LoadingController protocol integrating a UI control you prefer.
You can find an iOS demo using the Loading connector here.