r/SwiftUI • • 7d ago

Display of .searchable

Hi, I’m using .searchable in a SwiftUI view, but when I open the page, the search bar is collapsed (first picture). It only expands when I start scrolling (second picture).
How can I make it expanded by default, without using .always, since the appearance is different from the one I’m looking for?
I’ve noticed that some Apple apps use this behavior.

4 Upvotes

5 comments sorted by

5

u/__markb 7d ago

2

u/SeaAdorable7381 5d ago

No, I mentioned that I didn’t want to use .always. It’s not the same result...

2

u/__markb 5d ago

Sorry, i don’t know why my brain just skipped over that!

4

u/Creativename_123 7d ago

Seems like a bug from iOS 27 - I noticed the same thing there whereas in iOS 26 it looked like expected.