Search and Filter a List in SwiftUI

Опубликовано: 20 Март 2026
на канале: Cody Henrichsen
1,477
4

Making an iOS 15+ data list searchable by using the searchable modifier and a closure attached to the data store.

Table of Contents:

00:10 - Look at other video for iOS 14 or less
00:25 - The searchedText @State variable
00:36 - The filtered local data store
01:12 - Filter the results to match
01:25 - Use $0 for the unnamed closure item
01:57 - Link filtered results to the ForEach
02:29 - Make the List searchable
02:47 - Show filter by year
02:58 - Filter by mythological creature
03:03 - Search by goal: pokemon
03:16 - Code review