2

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

Nitesh
  • 1,924
  • 21
  • 31
  • I am wondering the same, but I am afraid we need to populate our results table ourselves by listing all available tokens if the search text is empty. – bio Feb 15 '20 at 16:58
  • The new searchable instance method in iOS16 may help you⟹ developer.apple.com/videos/play/wwdc2022/10052/?time=1392 – XLE_22 Jun 24 '22 at 14:30

1 Answers1

0

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.

Otto Lindén
  • 1
  • 1
  • 1