|
Hi all, In Day 96, Paul implements a .searchable search bar that shows ideal behavior (imo) - the search bar stays hidden until the user pulls down slightly on the view, causing the search bar to appear to slide out from under the navigation bar into view. I noticed that this behavior does not seem to still be present in the current version of Swift - when using .searchable, the search bar is always visible. A forum post from about a year ago seems to note this as well, but I'm having trouble confirming this elsewhere. Am I crazy, does this behavior still exist? Paul's code, in case you'd like to test it yourself:
Thanks! |
|
Quick answer Yes. Think they have changed it to make the search more accessible (do not quote me on that). However you can change it to alway show with by add |
|
Hey Nigel! Thanks as always for taking a look :) I'm actually looking for the opposite behavior - I want the search bar to be hidden until you pull down (see 3:20 in Paul's video linked above). It's a minor visual annoyance if anything, but I was curious if I'm doing something wrong or if the searchable visibility really has changed. |
|
Yes, search bar has changedThere are a number of options for However in iOS it mainly down to two.
My guess is that Apple may of thought that the search bar was to hidden and user did not know about it, and therefore make more available 🤷 |
|
I thought I was going nuts with this problem! Glad to see others have run into it, too. My app's main UI is a TabView, and oddly the searchbar is still hidden by default on the first tabview tab displayed, but not the others. And it's not hidden on the first tabview tab consistently. Not happy with the change...I wonder whether this is a bug in the searchable code. |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.