Search code examples
swiftuisearchbar

Tags in Search Bar with Swift


In the iOS photos app, after I search 'September', I can press on it in the list, and then it adds a tag to the search bar (like in the image) image

How can I do something like that in my app using Swift?


Solution

  • In AppKit we have NSTokenField for something like that. Apple apparently hasn't released an equivalent for iOS that can be used out of the box at this time. There seem to be a couple of custom implementations though you might want to check out.

    Is there an iPhone equivalent to the NSTokenField control?
    https://stackoverflow.com/search?q=nstokenfield+ios