How to show UISearchToken in suggested searches list when user taps on searchbar?

830 Views Asked by At

enter image description here

Apple has announced new UIsearch bar api in WWDC 2019 : Modernizing Your UI for iOS 13. There we got to know new api for adding search tokens in search bar. but I wonder how we can achieve the representation of suggested searches as it's attached in screen shot. Please help

I tried this api in Xcode11.1

1

There are 1 best solutions below

0
On

You can achieve this by populating the tableview or collection-view, where you would show the results with your suggestions, or creating a new tableview / collection-view specifically for showing suggestions.

However UISearchToken is only in the search text field, so you would have to create a new UITableViewCell or UICollectionViewCell.