Post

Replies

Boosts

Views

Activity

Hide search field always
Greetings, Please type slowly, I'm new at this. iOS 18.x. Added search to a list, visibility toggled with a toolbar button, using this line of code: .searchable(text: $searchText, isPresented: $isSearchPresented, placement: .navigationBarDrawer(displayMode: .automatic), prompt: "Search...") Realized I was re-stating defaults, changed it to this: .searchable(text: $searchText, isPresented: $isSearchPresented, prompt: "Search...") In both cases, it works great when in the middle of the list, just like I wanted. However, when I scroll to the top of the list, the serach field is displayed even when 'isPresented' is false. Is there any way to keep the search field hidden even at the top of the list? ..thanks!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2
0
106
Jul ’25